Submission #214353
Source Code Expand
#include <iostream> #include <stdio.h> using namespace std; int main() { int N, M, D; int Am[200000]; int result[100000]; cin >> N >> M >> D; for( int k = 0; k < M; k++ ) scanf("%d", &Am[k] ); // cin >> Am[k]; ////// ///// int i, col_val, j; //全ての縦線を試す for( col_val = 1; col_val <= N; col_val++ ) { //Dがあるだけ繰り返す for( i = 0; i < D; i++ ) { if( i == 0 ) result[col_val - 1] = col_val; //全てのあみだ横線を処理 for( j = 0; j < M; j++ ) { //横線左側にかかっていれば if( Am[ j ] == result[col_val - 1] ) result[col_val - 1]++; else if( ( Am[ j ] + 1 ) == result[col_val - 1] ) result[col_val - 1]--; } } } //output for( col_val = 0; col_val < N; col_val++ ) printf("%d\n", result[ col_val ] ); // cout << result[ col_val ] << endl; }
Submission Info
Submission Time | |
---|---|
Task | D - 阿弥陀 |
User | Takayama |
Language | C++ (G++ 4.6.4) |
Score | 0 |
Code Size | 950 Byte |
Status | TLE |
Exec Time | 4037 ms |
Memory | 1740 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:11:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
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 | TLE | 4030 ms | 1740 KB |
01_random01.txt | AC | 23 ms | 916 KB |
01_random02.txt | AC | 21 ms | 804 KB |
01_random03.txt | AC | 21 ms | 928 KB |
01_random04.txt | AC | 65 ms | 932 KB |
01_random05.txt | TLE | 4029 ms | 1320 KB |
01_random06.txt | TLE | 4028 ms | 1568 KB |
01_random07.txt | TLE | 4029 ms | 1700 KB |
02_i.txt | AC | 2903 ms | 932 KB |
02_p.txt | AC | 1321 ms | 808 KB |
02_random01.txt | AC | 21 ms | 932 KB |
02_random02.txt | AC | 21 ms | 932 KB |
02_random03.txt | AC | 437 ms | 928 KB |
02_random04.txt | AC | 22 ms | 800 KB |
02_random05.txt | TLE | 4029 ms | 884 KB |
02_random06.txt | AC | 470 ms | 1116 KB |
02_random07.txt | TLE | 4029 ms | 1700 KB |
02_random08.txt | TLE | 4029 ms | 1644 KB |
02_rp01.txt | AC | 824 ms | 916 KB |
02_rp02.txt | AC | 748 ms | 928 KB |
02_rp03.txt | AC | 198 ms | 804 KB |
02_rp04.txt | AC | 757 ms | 800 KB |
02_rp05.txt | AC | 791 ms | 800 KB |
03_i.txt | TLE | 4028 ms | 884 KB |
03_random01.txt | TLE | 4029 ms | 940 KB |
03_random02.txt | TLE | 4029 ms | 1572 KB |
03_random03.txt | TLE | 4029 ms | 1452 KB |
03_random04.txt | TLE | 4029 ms | 1440 KB |
03_random05.txt | TLE | 4029 ms | 940 KB |
03_random06.txt | TLE | 4029 ms | 932 KB |
03_random07.txt | TLE | 4029 ms | 1068 KB |
03_random08.txt | TLE | 4030 ms | 880 KB |
03_random09.txt | TLE | 4033 ms | 1056 KB |
03_random10.txt | TLE | 4029 ms | 1320 KB |
03_random11.txt | TLE | 4029 ms | 1572 KB |
03_random12.txt | TLE | 4030 ms | 1572 KB |
03_random13.txt | TLE | 4029 ms | 1448 KB |
03_random14.txt | TLE | 4029 ms | 1320 KB |
03_random15.txt | TLE | 4028 ms | 1044 KB |
04_i.txt | TLE | 4029 ms | 1592 KB |
04_p1.txt | TLE | 4029 ms | 1312 KB |
04_p2.txt | TLE | 4028 ms | 1188 KB |
04_random01.txt | TLE | 4029 ms | 1324 KB |
04_random02.txt | TLE | 4029 ms | 1060 KB |
04_random03.txt | TLE | 4029 ms | 1204 KB |
04_random04.txt | TLE | 4029 ms | 1632 KB |
04_random05.txt | TLE | 4029 ms | 1504 KB |
04_random06.txt | TLE | 4029 ms | 1192 KB |
04_random07.txt | TLE | 4029 ms | 1576 KB |
04_random08.txt | TLE | 4029 ms | 1576 KB |
04_random09.txt | TLE | 4030 ms | 1696 KB |
04_random10.txt | TLE | 4029 ms | 1064 KB |
04_random11.txt | TLE | 4029 ms | 1704 KB |
04_random12.txt | TLE | 4029 ms | 1700 KB |
04_random13.txt | TLE | 4029 ms | 1708 KB |
04_rp01.txt | TLE | 4029 ms | 1312 KB |
04_rp02.txt | TLE | 4028 ms | 1312 KB |
04_rp03.txt | TLE | 4037 ms | 1304 KB |
04_rp04.txt | TLE | 4029 ms | 1316 KB |
04_rp05.txt | TLE | 4030 ms | 1324 KB |
04_rp06.txt | TLE | 4029 ms | 1240 KB |
04_rp07.txt | TLE | 4029 ms | 1320 KB |
04_rp08.txt | TLE | 4029 ms | 1244 KB |
04_rp09.txt | TLE | 4033 ms | 1204 KB |
04_rp10.txt | TLE | 4029 ms | 1312 KB |
sample_1.txt | AC | 22 ms | 804 KB |
sample_2.txt | AC | 22 ms | 928 KB |
sample_3.txt | AC | 22 ms | 920 KB |