Submission #2233213
Source Code Expand
#include <cstdio> #include <cstdlib> #include <iostream> #include <fstream> #include <sstream> #include <set> #include <map> #include <vector> #include <list> #include <algorithm> #include <cstring> #include <cmath> #include <string> #include <queue> #include <bitset> //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic #include <cassert> #include <iomanip> //do setprecision #include <ctime> #include <complex> using namespace std; #define FOR(i,b,e) for(int i=(b);i<(e);++i) #define FORQ(i,b,e) for(int i=(b);i<=(e);++i) #define FORD(i,b,e) for(int i=(b)-1;i>=(e);--i) #define REP(x, n) for(int x = 0; x < (n); ++x) #define ST first #define ND second #define PB push_back #define MP make_pair #define LL long long #define ULL unsigned LL #define LD long double const double pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342; const int mod=1000000007; int main(){ int n,m,d; int one[100100]={},r[2][100100]={}; cin>>n>>m>>d; FORQ(i,1,n)r[0][i]=i; FOR(i,0,m){ int a; cin>>a; swap(r[0][a],r[0][a+1]); } FORQ(i,1,n)one[r[0][i]]=i; //FORQ(i,1,n)cout<<r[i]<<endl; int t=0,idx=0; FORQ(ii,1,n){ int i=ii; while(1){ i=one[i]; t++; //idx^=1; int f=1; if(ii!=i)f=0; if(f){ d=d%t; break; } } i=ii; FOR(j,0,d){ i=one[i]; } cout<<i<<endl; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | D - 阿弥陀 |
User | kt_tenel |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1478 Byte |
Status | WA |
Exec Time | 4203 ms |
Memory | 2048 KB |
Judge Result
Set Name | Subtask1 | Subtask2 | Subtask3 | Subtask4 | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 10 | 0 / 20 | 0 / 20 | 0 / 50 | ||||||||||||||||||
Status |
|
|
|
|
Set Name | Test Cases |
---|---|
Subtask1 | sample_1.txt, 01_i.txt, 01_random01.txt, 01_random02.txt, 01_random03.txt, 01_random04.txt, 01_random05.txt, 01_random06.txt, 01_random07.txt |
Subtask2 | sample_1.txt, sample_2.txt, sample_3.txt, 02_i.txt, 02_p.txt, 02_random01.txt, 02_random02.txt, 02_random03.txt, 02_random04.txt, 02_random05.txt, 02_random06.txt, 02_random07.txt, 02_random08.txt, 02_rp01.txt, 02_rp02.txt, 02_rp03.txt, 02_rp04.txt, 02_rp05.txt |
Subtask3 | sample_1.txt, sample_2.txt, 03_i.txt, 03_random01.txt, 03_random02.txt, 03_random03.txt, 03_random04.txt, 03_random05.txt, 03_random06.txt, 03_random07.txt, 03_random08.txt, 03_random09.txt, 03_random10.txt, 03_random11.txt, 03_random12.txt, 03_random13.txt, 03_random14.txt, 03_random15.txt |
Subtask4 | sample_1.txt, sample_2.txt, sample_3.txt, 04_i.txt, 04_p1.txt, 04_p2.txt, 04_random01.txt, 04_random02.txt, 04_random03.txt, 04_random04.txt, 04_random05.txt, 04_random06.txt, 04_random07.txt, 04_random08.txt, 04_random09.txt, 04_random10.txt, 04_random11.txt, 04_random12.txt, 04_random13.txt, 04_rp01.txt, 04_rp02.txt, 04_rp03.txt, 04_rp04.txt, 04_rp05.txt, 04_rp06.txt, 04_rp07.txt, 04_rp08.txt, 04_rp09.txt, 04_rp10.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01_i.txt | AC | 225 ms | 2048 KB |
01_random01.txt | AC | 2 ms | 1408 KB |
01_random02.txt | AC | 2 ms | 1408 KB |
01_random03.txt | AC | 2 ms | 1408 KB |
01_random04.txt | AC | 9 ms | 1408 KB |
01_random05.txt | WA | 167 ms | 2048 KB |
01_random06.txt | WA | 208 ms | 2048 KB |
01_random07.txt | WA | 226 ms | 2048 KB |
02_i.txt | AC | 4 ms | 1408 KB |
02_p.txt | WA | 3 ms | 1408 KB |
02_random01.txt | AC | 2 ms | 1408 KB |
02_random02.txt | AC | 2 ms | 1408 KB |
02_random03.txt | WA | 4 ms | 1408 KB |
02_random04.txt | AC | 3 ms | 1408 KB |
02_random05.txt | WA | 8 ms | 1408 KB |
02_random06.txt | AC | 29 ms | 1408 KB |
02_random07.txt | WA | 54 ms | 1408 KB |
02_random08.txt | WA | 54 ms | 1408 KB |
02_rp01.txt | AC | 5 ms | 1408 KB |
02_rp02.txt | AC | 6 ms | 1408 KB |
02_rp03.txt | AC | 4 ms | 1408 KB |
02_rp04.txt | WA | 4 ms | 1408 KB |
02_rp05.txt | WA | 4 ms | 1408 KB |
03_i.txt | AC | 2 ms | 1408 KB |
03_random01.txt | AC | 4 ms | 1408 KB |
03_random02.txt | AC | 35 ms | 1408 KB |
03_random03.txt | AC | 29 ms | 1408 KB |
03_random04.txt | AC | 29 ms | 1408 KB |
03_random05.txt | AC | 7 ms | 1408 KB |
03_random06.txt | AC | 6 ms | 1408 KB |
03_random07.txt | AC | 9 ms | 1408 KB |
03_random08.txt | AC | 2 ms | 1408 KB |
03_random09.txt | AC | 12 ms | 1408 KB |
03_random10.txt | AC | 20 ms | 1408 KB |
03_random11.txt | WA | 34 ms | 1408 KB |
03_random12.txt | AC | 34 ms | 1408 KB |
03_random13.txt | AC | 27 ms | 1408 KB |
03_random14.txt | AC | 22 ms | 1408 KB |
03_random15.txt | AC | 10 ms | 1408 KB |
04_i.txt | AC | 225 ms | 2048 KB |
04_p1.txt | WA | 311 ms | 2048 KB |
04_p2.txt | WA | 237 ms | 1920 KB |
04_random01.txt | WA | 122 ms | 1792 KB |
04_random02.txt | WA | 87 ms | 1664 KB |
04_random03.txt | WA | 49 ms | 1408 KB |
04_random04.txt | WA | 72 ms | 1408 KB |
04_random05.txt | WA | 73 ms | 1536 KB |
04_random06.txt | WA | 126 ms | 1792 KB |
04_random07.txt | WA | 122 ms | 1664 KB |
04_random08.txt | WA | 104 ms | 1536 KB |
04_random09.txt | WA | 93 ms | 1536 KB |
04_random10.txt | WA | 114 ms | 1792 KB |
04_random11.txt | WA | 224 ms | 2048 KB |
04_random12.txt | WA | 224 ms | 2048 KB |
04_random13.txt | WA | 229 ms | 2048 KB |
04_rp01.txt | TLE | 4203 ms | 1664 KB |
04_rp02.txt | TLE | 4203 ms | 1536 KB |
04_rp03.txt | TLE | 4203 ms | 1792 KB |
04_rp04.txt | TLE | 4203 ms | 1536 KB |
04_rp05.txt | TLE | 4203 ms | 1920 KB |
04_rp06.txt | TLE | 4203 ms | 1792 KB |
04_rp07.txt | TLE | 4203 ms | 1792 KB |
04_rp08.txt | TLE | 4203 ms | 1664 KB |
04_rp09.txt | TLE | 4203 ms | 1536 KB |
04_rp10.txt | TLE | 4203 ms | 1664 KB |
sample_1.txt | AC | 2 ms | 1408 KB |
sample_2.txt | AC | 2 ms | 1408 KB |
sample_3.txt | AC | 2 ms | 1408 KB |