Submission #3387413


Source Code Expand

Copy
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;

int main(){
  long long N, M, K;
  cin >> N;
  vector<double> X(N);
  for(int i = 0; i < N; ++i) cin >> X[i];
  cin >> M >> K;
  vector<int> A(M);
  for(int i = 0; i < M; ++i) cin >> A[i], --A[i];
  K %= (M+1);
  for(int i = 0; i < K; ++i){
    for(int j = 0; j < M; ++j) X[A[j]] = X[A[j]+1] + X[A[j]-1] - X[A[j]];
  }
  for(int i = 0; i < N; ++i){
    printf("%.12f\n",X[i]);
  }
  return 0;
}

Submission Info

Submission Time
Task C - Rabbit Exercise
User TAB
Language C++14 (GCC 5.4.1)
Score 0
Code Size 495 Byte
Status
Exec Time 2103 ms
Memory 3712 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 0_00.txt, 0_01.txt, 0_02.txt
All 0 / 800 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt, 1_08.txt, 1_09.txt, 1_10.txt, 1_11.txt, 1_12.txt, 1_13.txt, 1_14.txt, 1_15.txt, 1_16.txt, 1_17.txt, 1_18.txt, 1_19.txt, 1_20.txt, 1_21.txt, 1_22.txt, 1_23.txt, 1_24.txt, 1_25.txt
Case Name Status Exec Time Memory
0_00.txt 1 ms 256 KB
0_01.txt 1 ms 256 KB
0_02.txt 1 ms 256 KB
1_00.txt 1 ms 256 KB
1_01.txt 1 ms 256 KB
1_02.txt 144 ms 3328 KB
1_03.txt 565 ms 3712 KB
1_04.txt
1_05.txt 112 ms 384 KB
1_06.txt
1_07.txt 1208 ms 384 KB
1_08.txt 602 ms 640 KB
1_09.txt
1_10.txt 268 ms 256 KB
1_11.txt 253 ms 384 KB
1_12.txt 9 ms 256 KB
1_13.txt
1_14.txt 975 ms 384 KB
1_15.txt
1_16.txt 10 ms 384 KB
1_17.txt
1_18.txt
1_19.txt
1_20.txt
1_21.txt
1_22.txt
1_23.txt 1109 ms 2944 KB
1_24.txt 265 ms 2176 KB
1_25.txt