Submission #2233362
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; const int SZ=10010; int main(){ int n,m,d,dtmp; int one[SZ*10]={},r[30][SZ*10]={}; cin>>n>>m>>dtmp; 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; FORQ(i,1,n)r[0][i]=one[i]; //FORQ(i,1,n)cout<<" "<<r[0][i]<<endl; FOR(j,0,30)FORQ(i,1,n){ r[j+1][i]=r[j][r[j][i]]; } FORQ(i,1,n){ int now=i; FOR(j,0,30){ if((dtmp&(1<<j))!=0){ now=r[j][now]; } } cout<<now<<endl; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | D - 阿弥陀 |
User | kt_tenel |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1524 Byte |
Status | RE |
Exec Time | 173 ms |
Memory | 12416 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 | RE | 172 ms | 12416 KB |
01_random01.txt | AC | 4 ms | 12416 KB |
01_random02.txt | AC | 4 ms | 12416 KB |
01_random03.txt | RE | 101 ms | 12416 KB |
01_random04.txt | RE | 104 ms | 12288 KB |
01_random05.txt | RE | 114 ms | 12416 KB |
01_random06.txt | RE | 153 ms | 12416 KB |
01_random07.txt | RE | 173 ms | 12416 KB |
02_i.txt | RE | 102 ms | 12416 KB |
02_p.txt | RE | 102 ms | 12416 KB |
02_random01.txt | AC | 4 ms | 12416 KB |
02_random02.txt | AC | 4 ms | 12416 KB |
02_random03.txt | RE | 101 ms | 12416 KB |
02_random04.txt | RE | 100 ms | 12288 KB |
02_random05.txt | RE | 106 ms | 12416 KB |
02_random06.txt | RE | 127 ms | 12416 KB |
02_random07.txt | RE | 153 ms | 12416 KB |
02_random08.txt | RE | 152 ms | 12416 KB |
02_rp01.txt | RE | 101 ms | 12416 KB |
02_rp02.txt | RE | 102 ms | 12416 KB |
02_rp03.txt | RE | 101 ms | 12416 KB |
02_rp04.txt | RE | 103 ms | 12416 KB |
02_rp05.txt | RE | 102 ms | 12416 KB |
03_i.txt | RE | 100 ms | 12416 KB |
03_random01.txt | AC | 8 ms | 12416 KB |
03_random02.txt | AC | 38 ms | 12416 KB |
03_random03.txt | AC | 32 ms | 12416 KB |
03_random04.txt | AC | 32 ms | 12416 KB |
03_random05.txt | AC | 10 ms | 12416 KB |
03_random06.txt | AC | 9 ms | 12416 KB |
03_random07.txt | AC | 12 ms | 12416 KB |
03_random08.txt | RE | 101 ms | 12416 KB |
03_random09.txt | RE | 110 ms | 12416 KB |
03_random10.txt | RE | 119 ms | 12416 KB |
03_random11.txt | RE | 131 ms | 12416 KB |
03_random12.txt | RE | 135 ms | 12416 KB |
03_random13.txt | RE | 126 ms | 12416 KB |
03_random14.txt | RE | 121 ms | 12416 KB |
03_random15.txt | RE | 110 ms | 12416 KB |
04_i.txt | RE | 173 ms | 12416 KB |
04_p1.txt | RE | 144 ms | 12416 KB |
04_p2.txt | RE | 130 ms | 12416 KB |
04_random01.txt | RE | 137 ms | 12288 KB |
04_random02.txt | RE | 117 ms | 12416 KB |
04_random03.txt | RE | 132 ms | 12416 KB |
04_random04.txt | RE | 156 ms | 12416 KB |
04_random05.txt | RE | 148 ms | 12416 KB |
04_random06.txt | RE | 131 ms | 12416 KB |
04_random07.txt | RE | 166 ms | 12416 KB |
04_random08.txt | RE | 155 ms | 12416 KB |
04_random09.txt | RE | 165 ms | 12416 KB |
04_random10.txt | RE | 121 ms | 12416 KB |
04_random11.txt | RE | 171 ms | 12416 KB |
04_random12.txt | RE | 173 ms | 12416 KB |
04_random13.txt | RE | 173 ms | 12416 KB |
04_rp01.txt | RE | 137 ms | 12416 KB |
04_rp02.txt | RE | 136 ms | 12416 KB |
04_rp03.txt | RE | 137 ms | 12416 KB |
04_rp04.txt | RE | 138 ms | 12416 KB |
04_rp05.txt | RE | 139 ms | 12288 KB |
04_rp06.txt | RE | 137 ms | 12416 KB |
04_rp07.txt | RE | 138 ms | 12288 KB |
04_rp08.txt | RE | 138 ms | 12416 KB |
04_rp09.txt | RE | 138 ms | 12416 KB |
04_rp10.txt | RE | 137 ms | 12416 KB |
sample_1.txt | AC | 4 ms | 12416 KB |
sample_2.txt | AC | 4 ms | 12416 KB |
sample_3.txt | RE | 101 ms | 12416 KB |