Tên đăng nhập Điểm ▴ Bài tập Giới thiệu
20701 1241 18
20702 1242 4
20703 1242 19
20704 1244 10
20705 1245 6
20706 1246 8
20707 1247 12
20708 1249 6
20709 1249 6
20710
thanhminh2009
Phan Thanh Minh
1249 6
20711 1249 5
20712 1250 4
20713 1250 7
20714 1252 5
20715 1252 5
20715 1252 5
20715 1252 5
20718
BL7D23_SONTT
Thái Thanh sơn
1253 19
20719 1253 6
20720
linhqt1003
Trần Tùng Linh
1254 19
20721 1254 5
20722 1255 3
20723 1255 9
20724 1257 5
20724 1257 5
20726
STRB13Tu
Trần Anh Tú
1257 6
20727 1258 7
20728 1258 18
20729 1259 7
20730 1260 3
20731 1260 1
20731 1260 1
20731 1260 1

tao là thằng liều

20731 1260 1
20735 1260 4
20736 1260 7
20737 1260 7
20738 1261 2

None

20739 1262 8
20740 1262 19
20740 1262 19
20740
thanhtruc08
nguyen vi thanh truc 10 hoa
1262 19
20740
thaile422008
LÊ ĐÌNH THÁI LỚP VĂN
1262 19
20740
nhk28092008
Nguyễn Hoàng Kim 10 Anh
1262 19

Nguyễn Hoàng Kim
10 Anh

20740 1262 19
20740 1262 19
20747 1263 3
20748
tranngocthu1612
Trần Thị Ngọc Thư
1263 20
20749 1264 4
20750 1264 6
20751 1265 4
20752 1265 7
20752
29211458148
Lê Đức Anh
1265 7
20754 1266 6
20755 1266 5
20756 1266 10
20757 1266 3
20758 1267 8
20759 1267 3
20760 1267 2
20761 1268 18
20762 1268 3
20763 1268 9
20764 1270 4
20764 1270 4
20766 1270 3
20767 1272 8
20768 1273 3
20769 1273 1

include<iostream>

include <ext/pb_ds/assoc_container.hpp>

include <ext/pb_ds/tree_policy.hpp>

include<math.h>

include<algorithm>

include<stdio.h>

include<map>

include<vector>

include<set>

include<iomanip>

define F first

define S second

define P system("PAUSE");

define H return 0;

define pb push_back

define mod 1000000007

using namespace std;
using namespace __gnu_pbds;
bool sc(pair<int ,int> a, pair<int,int> b)
{
if(a.F==b.F)
return b.S<a.S; else return a.F\<b.F; } typedef tree\<int,null_type,less\<int>,rb_tree_tag,tree_order_statistics_node_update> ordered_set; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin>>n;
map<pair\<int,int>,pair\<int, int>> res;
vector<pair\<int,int>> a(n),b;
for(int i=0;i<n;i++) cin>>a[i].F>>a[i].S;
b=a;
sort(a.begin(),a.end(),greater());

set<int> luu;
luu.insert(a[0].S);
int minn,maxx;
minn=a[0].S;
for(int i=1;i<n;i++)
{
    if(a[i].S>=minn)
    res[a[i]].F=1;
    else minn=a[i].S;

}
 for(int i=0;i<n;i++)
cout<<a[i].F<<' '<<a[i].S<<endl; 
sort(a.begin(),a.end(),sc);
maxx=a[0].S;
luu.clear();
luu.insert(a[0].F);

for(int i=1;i<n;i++)
{
    if(a[i].S<=maxx)
    res[a[i]].S=1;
    else maxx=a[i].S;
}
 for(int i=0;i<n-1;i++)
 cout<<res[b[i]].F<<' ';
   cout<<res[b[n-1]].F;
 cout<<endl;
 for(int i=0;i<n-1;i++)
 cout<<res[b[i]].S<<' ';
 cout<<res[b[n-1]].S;

}

20770
KINGYEAH
BÙI GIA BẢO - TH2
1274 21
20771 1275 4
20772
Minhmon0107
Trần Ngọc Minh
1275 9
20773
TuanLovesCPP
Nguyễn Thanh Tuấn
1275 12

Tôi Là Người Mới Học Lập Trình

20774 1275 1
20775 1275 4
20776 1276 2
20777 1277 4
20778 1277 2
20778 1277 2
20780 1277 2
20781 1277 6
20782 1277 3

x,n,m = map(int,input().split())
t = 0
for i in range(n+1):
t += x**n
print(t % m)

20783 1278 3
20784 1279 7
20784 1279 7
20786 1280 13
20787 1280 1
20787 1280 1
20789 1280 5
20789 1280 5
20791
BL8D23_DũngNĐĐ
Nguyễn Đặng Đình Dũng
1282 19
20792 1283 6
20793 1283 3
20793 1283 3

10-grade

20793 1283 3
20796 1284 2
20797 1284 7
20798 1285 20
20798 1285 20
20800 1285 3