Submission #215628


Source Code Expand

Copy
#include<iostream>
#include<vector>
#include<cstdio>
#include<string>
#include<algorithm>
#include<numeric>
#include<map>
#include<math.h>
#include<stdlib.h>

using namespace::std;

int main(void)
{

  int N,M,D;

  cin >> N >> M >> D;

  vector<int> yoko(M);
  vector<int> tate(N);

  for(int i = 0; i < N; i++)
    {
      tate[i] = i + 1;
    }

  for(int i = 0; i < M; i++)
    {
      cin >> yoko[i];
    }
  reverse(yoko.begin() , yoko.end());
  for(int i = 0; i < D; i++)
    {
      for(int j = 0; j < M; j++)
	{
	  swap(tate[yoko[j]-1] , tate[yoko[j]]);
	}
    }

  for(int i = 0; i < tate.size(); i++)
    {
      cout << tate[i] << endl;
    }

  return 0;
}

Submission Info

Submission Time
Task D - 阿弥陀
User yakk512
Language C++ (G++ 4.6.4)
Score 30
Code Size 717 Byte
Status TLE
Exec Time 4037 ms
Memory 2792 KB

Judge Result

Set Name Subtask1 Subtask2 Subtask3 Subtask4
Score / Max Score 10 / 10 20 / 20 0 / 20 0 / 50
Status
AC × 9
AC × 18
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 AC 500 ms 2792 KB
01_random01.txt AC 77 ms 1000 KB
01_random02.txt AC 27 ms 1060 KB
01_random03.txt AC 28 ms 980 KB
01_random04.txt AC 45 ms 1124 KB
01_random05.txt AC 429 ms 1996 KB
01_random06.txt AC 479 ms 2480 KB
01_random07.txt AC 503 ms 2732 KB
02_i.txt AC 37 ms 1000 KB
02_p.txt AC 33 ms 1068 KB
02_random01.txt AC 31 ms 1000 KB
02_random02.txt AC 27 ms 1044 KB
02_random03.txt AC 34 ms 1044 KB
02_random04.txt AC 31 ms 1048 KB
02_random05.txt AC 49 ms 1196 KB
02_random06.txt AC 68 ms 1436 KB
02_random07.txt AC 558 ms 1712 KB
02_random08.txt AC 552 ms 1708 KB
02_rp01.txt AC 33 ms 1000 KB
02_rp02.txt AC 35 ms 992 KB
02_rp03.txt AC 34 ms 976 KB
02_rp04.txt AC 36 ms 1004 KB
02_rp05.txt AC 35 ms 980 KB
03_i.txt TLE 4034 ms 1128 KB
03_random01.txt TLE 4034 ms 1184 KB
03_random02.txt TLE 4034 ms 1868 KB
03_random03.txt TLE 4036 ms 1656 KB
03_random04.txt TLE 4034 ms 1708 KB
03_random05.txt TLE 4035 ms 1228 KB
03_random06.txt TLE 4037 ms 1216 KB
03_random07.txt TLE 4035 ms 1220 KB
03_random08.txt TLE 4034 ms 1064 KB
03_random09.txt TLE 4035 ms 1288 KB
03_random10.txt TLE 4036 ms 1476 KB
03_random11.txt TLE 4035 ms 1864 KB
03_random12.txt TLE 4033 ms 1832 KB
03_random13.txt TLE 4036 ms 1640 KB
03_random14.txt TLE 4035 ms 1608 KB
03_random15.txt TLE 4035 ms 1320 KB
04_i.txt TLE 4035 ms 2224 KB
04_p1.txt TLE 4036 ms 1884 KB
04_p2.txt TLE 4036 ms 1736 KB
04_random01.txt TLE 4034 ms 1736 KB
04_random02.txt TLE 4036 ms 1444 KB
04_random03.txt TLE 4035 ms 1516 KB
04_random04.txt TLE 4034 ms 1800 KB
04_random05.txt TLE 4035 ms 1720 KB
04_random06.txt TLE 4034 ms 1620 KB
04_random07.txt TLE 4035 ms 1896 KB
04_random08.txt TLE 4035 ms 1876 KB
04_random09.txt TLE 4035 ms 1880 KB
04_random10.txt TLE 4033 ms 1508 KB
04_random11.txt TLE 4035 ms 2164 KB
04_random12.txt TLE 4035 ms 2216 KB
04_random13.txt TLE 4035 ms 2240 KB
04_rp01.txt TLE 4036 ms 1876 KB
04_rp02.txt TLE 4033 ms 1820 KB
04_rp03.txt TLE 4035 ms 1768 KB
04_rp04.txt TLE 4035 ms 1860 KB
04_rp05.txt TLE 4034 ms 1848 KB
04_rp06.txt TLE 4034 ms 1768 KB
04_rp07.txt TLE 4035 ms 1872 KB
04_rp08.txt TLE 4034 ms 1864 KB
04_rp09.txt TLE 4036 ms 1896 KB
04_rp10.txt TLE 4035 ms 1840 KB
sample_1.txt AC 29 ms 1048 KB
sample_2.txt AC 28 ms 980 KB
sample_3.txt AC 31 ms 1044 KB