Tên đăng nhập Điểm ▾ Bài tập Giới thiệu
14001 1288 7
14002 1287 2
14002 1287 2

Dep trai khoai to

14002 1287 2
14002 1287 2
14006 1287 7
14007 1286 6
14008 1286 17
14009
zzz
=))
1285 2
14010 1285 4
14011 1285 3
14012 1285 20
14012 1285 20
14014 1284 7
14015 1284 2
14016 1283 3
14016 1283 3

10-grade

14016 1283 3
14019
BL8D23_DũngNĐĐ
Nguyễn Đặng Đình Dũng
1282 19
14020 1280 5
14020 1280 5
14022 1280 1
14022 1280 1
14024 1280 13
14025 1279 7
14026 1278 3
14027 1277 3

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

14028 1277 6
14029 1277 2
14030 1277 2
14030 1277 2
14032 1277 4
14033 1276 2
14034 1275 4
14035 1275 1
14036
TuanLovesCPP
Nguyễn Thanh Tuấn
1275 12

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

14037
Minhmon0107
Trần Ngọc Minh
1275 9
14038 1275 4
14039
KINGYEAH
BÙI GIA BẢO - TH2
1274 21
14040 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;

}

14041 1273 3
14042 1272 8
14043 1270 3
14044 1270 4
14044 1270 4
14046 1268 9
14047 1268 3
14048 1268 18
14049 1267 2
14050 1267 3
14051 1267 8
14052 1266 10
14053 1266 5
14054 1266 6
14055 1265 7
14055
29211458148
Lê Đức Anh
1265 7
14057 1265 4
14058 1264 6
14059 1264 4
14060
tranngocthu1612
Trần Thị Ngọc Thư
1263 20
14061 1263 3
14062 1262 19
14062 1262 19
14062
thanhtruc08
nguyen vi thanh truc 10 hoa
1262 19
14062
thaile422008
LÊ ĐÌNH THÁI LỚP VĂN
1262 19
14062
nhk28092008
Nguyễn Hoàng Kim 10 Anh
1262 19

Nguyễn Hoàng Kim
10 Anh

14062 1262 19
14062 1262 19
14069 1262 8
14070 1261 2

None

14071 1260 7
14072 1260 7
14073 1260 4
14074 1260 1
14074 1260 1
14074 1260 1

tao là thằng liều

14074 1260 1
14078 1260 3
14079 1259 9
14080 1259 7
14081 1258 18
14082 1258 7
14083 1257 12
14084
STRB13Tu
Trần Anh Tú
1257 6
14085 1257 5
14085 1257 5
14087 1255 9
14088 1255 3
14089 1254 5
14090
linhqt1003
Trần Tùng Linh
1254 19
14091 1253 6
14092
BL7D23_SONTT
Thái Thanh sơn
1253 19
14093 1252 5
14093 1252 5
14093 1252 5
14096 1252 5
14097 1250 7
14098 1250 4
14099 1249 5
14100
thanhminh2009
Phan Thanh Minh
1249 6