Submission #214354


Source Code Expand

#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>

#define INF 1000000000
#define MAXM 200010

using namespace std;
typedef long long ll;

int N, M, D;
int A[MAXM];

int main(void) {
    cin >> N >> M >> D;
    for (int i = 0; i < M; i++) cin >> A[i];
    int to[N+1];
    for (int i = 1; i <= N; i++) {
        int cur = i;
        for (int j = 0; j < M; j++) {
            if (cur == A[j]) {
                cur = A[j] + 1;
            } else if (cur == A[j]+1) {
                cur = A[j];
            }
        }
        to[i] = cur;
    }
    for (int i = 1; i <= N; i++) {
        int cur = i;
        for (int i = 0; i < D; i++) {
            cur = to[cur];
        }
        cout << cur << endl;
    }
    return 0;
}

Submission Info

Submission Time
Task D - 阿弥陀
User mayoko
Language C++ (G++ 4.6.4)
Score 20
Code Size 976 Byte
Status TLE
Exec Time 4045 ms
Memory 2164 KB

Judge Result

Set Name Subtask1 Subtask2 Subtask3 Subtask4
Score / Max Score 0 / 10 20 / 20 0 / 20 0 / 50
Status
AC × 5
TLE × 4
AC × 18
AC × 9
TLE × 9
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 4039 ms 2164 KB
01_random01.txt AC 31 ms 1200 KB
01_random02.txt AC 33 ms 1172 KB
01_random03.txt AC 32 ms 1168 KB
01_random04.txt AC 90 ms 1160 KB
01_random05.txt TLE 4038 ms 1688 KB
01_random06.txt TLE 4037 ms 1892 KB
01_random07.txt TLE 4038 ms 2152 KB
02_i.txt AC 42 ms 1172 KB
02_p.txt AC 40 ms 1168 KB
02_random01.txt AC 31 ms 1196 KB
02_random02.txt AC 31 ms 1168 KB
02_random03.txt AC 41 ms 1168 KB
02_random04.txt AC 38 ms 1168 KB
02_random05.txt AC 70 ms 1292 KB
02_random06.txt AC 216 ms 1544 KB
02_random07.txt AC 399 ms 1932 KB
02_random08.txt AC 397 ms 1936 KB
02_rp01.txt AC 38 ms 1168 KB
02_rp02.txt AC 38 ms 1172 KB
02_rp03.txt AC 38 ms 1168 KB
02_rp04.txt AC 38 ms 1168 KB
02_rp05.txt AC 39 ms 1164 KB
03_i.txt TLE 4038 ms 1324 KB
03_random01.txt AC 417 ms 1284 KB
03_random02.txt AC 855 ms 1944 KB
03_random03.txt AC 1725 ms 1808 KB
03_random04.txt AC 1508 ms 1816 KB
03_random05.txt TLE 4038 ms 1296 KB
03_random06.txt TLE 4045 ms 1392 KB
03_random07.txt TLE 4039 ms 1392 KB
03_random08.txt AC 971 ms 1168 KB
03_random09.txt AC 2670 ms 1420 KB
03_random10.txt TLE 4039 ms 1552 KB
03_random11.txt TLE 4038 ms 2028 KB
03_random12.txt TLE 4039 ms 1928 KB
03_random13.txt TLE 4038 ms 1900 KB
03_random14.txt AC 608 ms 1676 KB
03_random15.txt TLE 4039 ms 1392 KB
04_i.txt TLE 4040 ms 2164 KB
04_p1.txt TLE 4038 ms 1680 KB
04_p2.txt TLE 4041 ms 1676 KB
04_random01.txt TLE 4038 ms 1772 KB
04_random02.txt TLE 4038 ms 1632 KB
04_random03.txt TLE 4040 ms 1724 KB
04_random04.txt TLE 4040 ms 1940 KB
04_random05.txt TLE 4038 ms 1960 KB
04_random06.txt TLE 4038 ms 1776 KB
04_random07.txt TLE 4040 ms 1936 KB
04_random08.txt TLE 4038 ms 1932 KB
04_random09.txt TLE 4039 ms 2156 KB
04_random10.txt TLE 4038 ms 1648 KB
04_random11.txt TLE 4038 ms 2060 KB
04_random12.txt TLE 4039 ms 2056 KB
04_random13.txt TLE 4039 ms 2160 KB
04_rp01.txt TLE 4039 ms 1768 KB
04_rp02.txt TLE 4040 ms 1680 KB
04_rp03.txt TLE 4040 ms 1680 KB
04_rp04.txt TLE 4039 ms 1772 KB
04_rp05.txt TLE 4040 ms 1772 KB
04_rp06.txt TLE 4039 ms 1680 KB
04_rp07.txt TLE 4039 ms 1684 KB
04_rp08.txt TLE 4040 ms 1776 KB
04_rp09.txt TLE 4040 ms 1748 KB
04_rp10.txt TLE 4040 ms 1680 KB
sample_1.txt AC 32 ms 1164 KB
sample_2.txt AC 33 ms 1252 KB
sample_3.txt AC 33 ms 1168 KB