# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1042182 | raphaelp | 고대 책들 (IOI17_books) | C++14 | 컴파일 에러 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
int64 minimum_walk(int[] p, int S){
int N=p.size();
int64 ans=0;
for (int i=0; i<N; i++)
{ ans+=abs(i-p[i]); } vector<int>occ(N);
for(int i=0; i<N; i++) { if(occ[i])continue;
int x=i;
ans+=2; while(!occ[x]) { occ[x]=1; x=p[x]; } return ans-2;}
컴파일 시 표준 에러 (stderr) 메시지
books.cpp:7:5: error: extended character is not valid in an identifier 7 | { ans+=abs(i-p[i]); } vector<int>occ(N); | ^ books.cpp:7:8: error: extended character is not valid in an identifier 7 | { ans+=abs(i-p[i]); } vector<int>occ(N); | ^ books.cpp:7:31: error: extended character is not valid in an identifier 7 | { ans+=abs(i-p[i]); } vector<int>occ(N); | ^ books.cpp:8:29: error: extended character is not valid in an identifier 8 | for(int i=0; i<N; i++) { if(occ[i])continue; | ^ books.cpp:8:32: error: extended character is not valid in an identifier 8 | for(int i=0; i<N; i++) { if(occ[i])continue; | ^ books.cpp:9:2: error: extended character is not valid in an identifier 9 | int x=i; | ^ books.cpp:9:5: error: extended character is not valid in an identifier 9 | int x=i; | ^ books.cpp:9:16: error: extended character is not valid in an identifier 9 | int x=i; | ^ books.cpp:9:19: error: extended character is not valid in an identifier 9 | int x=i; | ^ books.cpp:10:36: error: extended character is not valid in an identifier 10 | ans+=2; while(!occ[x]) { occ[x]=1; x=p[x]; } return ans-2;} | ^ books.cpp:10:39: error: extended character is not valid in an identifier 10 | ans+=2; while(!occ[x]) { occ[x]=1; x=p[x]; } return ans-2;} | ^ books.cpp:10:56: error: extended character is not valid in an identifier 10 | ans+=2; while(!occ[x]) { occ[x]=1; x=p[x]; } return ans-2;} | ^ books.cpp:10:62: error: extended character is not valid in an identifier 10 | ans+=2; while(!occ[x]) { occ[x]=1; x=p[x]; } return ans-2;} | ^ books.cpp:10:65: error: extended character is not valid in an identifier 10 | ans+=2; while(!occ[x]) { occ[x]=1; x=p[x]; } return ans-2;} | ^ books.cpp:10:68: error: extended character is not valid in an identifier 10 | ans+=2; while(!occ[x]) { occ[x]=1; x=p[x]; } return ans-2;} | ^ books.cpp:10:80: error: extended character is not valid in an identifier 10 | ans+=2; while(!occ[x]) { occ[x]=1; x=p[x]; } return ans-2;} | ^ books.cpp:10:83: error: extended character is not valid in an identifier 10 | ans+=2; while(!occ[x]) { occ[x]=1; x=p[x]; } return ans-2;} | ^ books.cpp:10:86: error: extended character is not valid in an identifier 10 | ans+=2; while(!occ[x]) { occ[x]=1; x=p[x]; } return ans-2;} | ^ books.cpp:10:96: error: extended character is not valid in an identifier 10 | ans+=2; while(!occ[x]) { occ[x]=1; x=p[x]; } return ans-2;} | ^ books.cpp:10:102: error: extended character is not valid in an identifier 10 | ans+=2; while(!occ[x]) { occ[x]=1; x=p[x]; } return ans-2;} | ^ books.cpp:3:1: error: 'int64' does not name a type; did you mean 'int64_t'? 3 | int64 minimum_walk(int[] p, int S){ | ^~~~~ | int64_t