Submission #214119


Source Code Expand

Copy
#include <iostream>
using namespace std;

int main() {
   int N, M, D;
   int Am[200000];
   int result[100000];
   cin >> N >> M >> D;
   for( int i = 0; i < M; i++ )
      cin >> Am[i];
   //////
   /////

   //Dがあるだけ繰り返す
   for( int i = 0; i < D; i++ ) {
      //全ての縦線を試す
      for( int col_val = 1; col_val <= N; col_val++ ) {
	 if( i == 0 ) result[col_val - 1] = col_val;
	 //全てのあみだ横線を処理
	 for( int 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( int col_val = 1; col_val <= N; col_val++ )
      cout << result[col_val - 1] << endl;
}

Submission Info

Submission Time
Task D - 阿弥陀
User Takayama
Language C++ (G++ 4.6.4)
Score 0
Code Size 845 Byte
Status TLE
Exec Time 4067 ms
Memory 1760 KB

Judge Result

Set Name Subtask1 Subtask2 Subtask3 Subtask4
Score / Max Score 0 / 10 0 / 20 0 / 20 0 / 50
Status
AC × 5
TLE × 4
AC × 15
TLE × 3
AC × 2
TLE × 16
AC × 3
TLE × 26
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 4031 ms 1708 KB
01_random01.txt AC 25 ms 928 KB
01_random02.txt AC 24 ms 924 KB
01_random03.txt AC 30 ms 812 KB
01_random04.txt AC 81 ms 924 KB
01_random05.txt TLE 4030 ms 1176 KB
01_random06.txt TLE 4031 ms 1508 KB
01_random07.txt TLE 4067 ms 1708 KB
02_i.txt AC 2954 ms 792 KB
02_p.txt AC 1351 ms 732 KB
02_random01.txt AC 21 ms 736 KB
02_random02.txt AC 22 ms 788 KB
02_random03.txt AC 456 ms 736 KB
02_random04.txt AC 28 ms 736 KB
02_random05.txt TLE 4029 ms 928 KB
02_random06.txt AC 514 ms 1188 KB
02_random07.txt TLE 4034 ms 1700 KB
02_random08.txt TLE 4030 ms 1700 KB
02_rp01.txt AC 841 ms 924 KB
02_rp02.txt AC 768 ms 928 KB
02_rp03.txt AC 213 ms 924 KB
02_rp04.txt AC 784 ms 732 KB
02_rp05.txt AC 811 ms 792 KB
03_i.txt TLE 4028 ms 804 KB
03_random01.txt TLE 4030 ms 872 KB
03_random02.txt TLE 4031 ms 1572 KB
03_random03.txt TLE 4030 ms 1444 KB
03_random04.txt TLE 4031 ms 1436 KB
03_random05.txt TLE 4029 ms 936 KB
03_random06.txt TLE 4029 ms 936 KB
03_random07.txt TLE 4029 ms 1064 KB
03_random08.txt TLE 4029 ms 884 KB
03_random09.txt TLE 4037 ms 1060 KB
03_random10.txt TLE 4029 ms 1264 KB
03_random11.txt TLE 4029 ms 1568 KB
03_random12.txt TLE 4029 ms 1568 KB
03_random13.txt TLE 4030 ms 1452 KB
03_random14.txt TLE 4033 ms 1312 KB
03_random15.txt TLE 4038 ms 1052 KB
04_i.txt TLE 4029 ms 1700 KB
04_p1.txt TLE 4030 ms 1312 KB
04_p2.txt TLE 4029 ms 1248 KB
04_random01.txt TLE 4029 ms 1440 KB
04_random02.txt TLE 4055 ms 1188 KB
04_random03.txt TLE 4031 ms 1316 KB
04_random04.txt TLE 4036 ms 1692 KB
04_random05.txt TLE 4030 ms 1572 KB
04_random06.txt TLE 4030 ms 1372 KB
04_random07.txt TLE 4030 ms 1728 KB
04_random08.txt TLE 4030 ms 1628 KB
04_random09.txt TLE 4030 ms 1704 KB
04_random10.txt TLE 4029 ms 1312 KB
04_random11.txt TLE 4032 ms 1760 KB
04_random12.txt TLE 4030 ms 1640 KB
04_random13.txt TLE 4031 ms 1688 KB
04_rp01.txt TLE 4034 ms 1316 KB
04_rp02.txt TLE 4029 ms 1372 KB
04_rp03.txt TLE 4030 ms 1376 KB
04_rp04.txt TLE 4033 ms 1316 KB
04_rp05.txt TLE 4029 ms 1312 KB
04_rp06.txt TLE 4031 ms 1316 KB
04_rp07.txt TLE 4029 ms 1312 KB
04_rp08.txt TLE 4030 ms 1316 KB
04_rp09.txt TLE 4030 ms 1320 KB
04_rp10.txt TLE 4030 ms 1376 KB
sample_1.txt AC 21 ms 924 KB
sample_2.txt AC 21 ms 920 KB
sample_3.txt AC 27 ms 920 KB