Submission #1005943

# Submission time Handle Problem Language Result Execution time Memory
1005943 2024-06-23T08:36:28 Z irmuun Mechanical Doll (IOI18_doll) C++17
2 / 100
14 ms 3164 KB
#include<bits/stdc++.h>
#include "doll.h"

using namespace std;

#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()

void create_circuit(int M,vector<int>A){
    vector<int>C(M+1,0);
    C[0]=A[0];
    for(int i=1;i<A.size();i++){
        C[A[i-1]]=A[i];
    }
    C[A.back()]=0;
    answer(C,{},{});
    return;
}

Compilation message

doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:16:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |     for(int i=1;i<A.size();i++){
      |                 ~^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 12 ms 2432 KB Output is correct
3 Correct 8 ms 2096 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 5 ms 1464 KB Output is correct
6 Correct 13 ms 2908 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 12 ms 2432 KB Output is correct
3 Correct 8 ms 2096 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 5 ms 1464 KB Output is correct
6 Correct 13 ms 2908 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Incorrect 14 ms 3164 KB wrong motion
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 12 ms 2432 KB Output is correct
3 Correct 8 ms 2096 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 5 ms 1464 KB Output is correct
6 Correct 13 ms 2908 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Incorrect 14 ms 3164 KB wrong motion
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB wrong motion
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB wrong motion
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB wrong motion
2 Halted 0 ms 0 KB -