Tên đăng nhập Điểm ▴ Bài tập Giới thiệu
21001 1262 19
21001
thanhtruc08
nguyen vi thanh truc 10 hoa
1262 19
21001
thaile422008
LÊ ĐÌNH THÁI LỚP VĂN
1262 19
21001
nhk28092008
Nguyễn Hoàng Kim 10 Anh
1262 19

Nguyễn Hoàng Kim
10 Anh

21001 1262 19
21001 1262 19
21007 1263 3
21008
tranngocthu1612
Trần Thị Ngọc Thư
1263 20
21009 1264 4
21010 1264 6
21011 1265 4
21012 1265 7
21012
29211458148
Lê Đức Anh
1265 7
21014 1266 6
21015 1266 5
21016 1266 10
21017 1267 8
21018 1267 3
21019 1267 2
21020 1268 18
21021 1268 3
21022 1268 9
21023 1270 4
21023 1270 4
21025 1270 3
21026 1272 8
21027 1273 3
21028 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;

}

21029 1273 3
21030
KINGYEAH
BÙI GIA BẢO - TH2
1274 21
21031 1275 4
21032
Minhmon0107
Trần Ngọc Minh
1275 9
21033
TuanLovesCPP
Nguyễn Thanh Tuấn
1275 12

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

21034 1275 1
21035 1275 4
21036 1276 2
21037 1277 4
21038 1277 2
21038 1277 2
21040 1277 2
21041 1277 6
21042 1277 3

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

21043 1278 3
21044 1279 7
21045 1280 13
21046 1280 1
21046 1280 1
21048 1280 5
21048 1280 5
21050
BL8D23_DũngNĐĐ
Nguyễn Đặng Đình Dũng
1282 19
21051 1283 3
21051 1283 3

10-grade

21051 1283 3
21054 1284 2
21055 1284 7
21056 1285 20
21056 1285 20
21058 1285 3
21059 1285 4
21060
zzz
=))
1285 2
21061 1286 17
21062 1286 6
21063 1287 7
21064 1287 2
21064 1287 2

Dep trai khoai to

21064 1287 2
21064 1287 2
21068 1288 7
21069
Quandt
VNG232629_Do_Trung_Quan
1288 5
21070 1289 5
21070 1289 5
21072 1290 4
21073 1290 9
21074
STR32Chi
Văn Khánh Chi
1292 10
21075 1292 2

kcj

21076 1292 1
21077 1292 5
21078 1293 5
21079 1294 8
21080 1294 12
21081 1294 7
21082 1294 7
21083 1294 7
21083 1294 7
21085 1294 6
21086
Simp
Lê Minh Đức
1294 16

Lê Minh Đức _ 2009 _ Trần Mai Ninh

21087 1294 22
21088
_Thanhbinh08
Dương Lê Thanh Bình 10V
1294 20
21089
OLP4SC098
Nguyễn Trọng Văn Viết
1294 3
21090 1295 2
21091
BL8A23_AnhDV
Việt Anh
1296 2
21092 1296 1
21093 1296 20
21094
hammer23 1245
Đặng Minh Nhật, H.Minh
1296 8
21095 1297 2
21095 1297 2
21095 1297 2
21095 1297 2
21099 1297 4
21100 1297 7