Tên đăng nhập Điểm ▾ Bài tập Giới thiệu
14301
Simp
Lê Minh Đức
1294 16

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

14302 1294 6
14303 1294 7
14303 1294 7
14305 1294 7
14306 1294 7
14307 1294 12
14308 1294 8
14309 1293 5
14310 1292 5
14311 1292 1
14312 1292 2

kcj

14313
STR32Chi
Văn Khánh Chi
1292 10
14314 1290 9
14315 1290 4
14316 1289 5
14316 1289 5
14318
Quandt
VNG232629_Do_Trung_Quan
1288 5
14319 1288 7
14320 1287 2
14320 1287 2
14320 1287 2
14323 1287 7
14324 1286 6
14325 1286 17
14326
zzz
=))
1285 2
14327 1285 4
14328 1285 3
14329 1285 20
14329 1285 20
14331 1284 7
14332 1284 2
14333 1283 3
14333 1283 3

10-grade

14333 1283 3
14336
BL8D23_DũngNĐĐ
Nguyễn Đặng Đình Dũng
1282 19
14337 1281 5
14338 1280 5
14338 1280 5
14340 1280 1
14340 1280 1
14342 1280 13
14343 1279 7
14344 1278 6
14345 1278 3
14346 1277 3

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

14347 1277 6
14348 1277 2
14349 1277 2
14349 1277 2
14351 1277 4
14352 1276 2
14353 1275 4
14354 1275 1
14355
TuanLovesCPP
Nguyễn Thanh Tuấn
1275 12

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

14356
Minhmon0107
Trần Ngọc Minh
1275 9
14357 1275 4
14357 1275 4
14359
KINGYEAH
BÙI GIA BẢO - TH2
1274 21
14360 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;

}

14361 1273 3
14362 1272 8
14363 1272 11
14364 1270 3
14365 1270 4
14365 1270 4
14365 1268 3
14368 1268 18
14369 1267 2
14370 1267 3
14371 1267 8
14372 1266 5
14373 1266 6
14374 1265 7
14374
29211458148
Lê Đức Anh
1265 7
14376 1264 6
14377 1264 4
14378
tranngocthu1612
Trần Thị Ngọc Thư
1263 20
14379 1263 3
14380 1262 19
14380 1262 19
14380
thanhtruc08
nguyen vi thanh truc 10 hoa
1262 19
14380
thaile422008
LÊ ĐÌNH THÁI LỚP VĂN
1262 19
14380
nhk28092008
Nguyễn Hoàng Kim 10 Anh
1262 19

Nguyễn Hoàng Kim
10 Anh

14380 1262 19
14380 1262 19
14387 1262 8
14388 1261 2

None

14389 1260 7
14390 1260 7
14391 1260 4
14392 1260 1
14392 1260 1
14392 1260 1

tao là thằng liều

14392 1260 1
14396 1260 3
14397 1259 9
14398 1259 7
14399 1258 18
14400 1257 12