제출 #474067

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
4740672021-09-16 18:41:51ValiAntonieMemory (IOI10_memory)C++14
0 / 100
1 ms316 KiB
#include "grader.h"
#include "memory.h"
#include <bits/stdc++.h>
using namespace std;
void play() {
// faceup();
int ap[100], path[100], nr;
for(int i=1;i<=50;i++){
char x = faceup(i);
if(ap[x] > 3)
ap[x] = 0;
if(path[x] > 100)
path[x] = 0;
ap[x]++;
if(ap[x] == 1)
path[x] = i;
else{
if(path[x] == i - 1 && i % 2 == 0)
continue;
else if(i % 2 == 1){
faceup(path[x]);
faceup(i);
}
else{
faceup(path[x]);
faceup(i);
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

memory.cpp: In function 'void play()':
memory.cpp:12:15: warning: array subscript has type 'char' [-Wchar-subscripts]
   12 |         if(ap[x] > 3)
      |               ^
memory.cpp:13:16: warning: array subscript has type 'char' [-Wchar-subscripts]
   13 |             ap[x] = 0;
      |                ^
memory.cpp:14:17: warning: array subscript has type 'char' [-Wchar-subscripts]
   14 |         if(path[x] > 100)
      |                 ^
memory.cpp:15:18: warning: array subscript has type 'char' [-Wchar-subscripts]
   15 |             path[x] = 0;
      |                  ^
memory.cpp:16:12: warning: array subscript has type 'char' [-Wchar-subscripts]
   16 |         ap[x]++;
      |            ^
memory.cpp:17:15: warning: array subscript has type 'char' [-Wchar-subscripts]
   17 |         if(ap[x] == 1)
      |               ^
memory.cpp:18:18: warning: array subscript has type 'char' [-Wchar-subscripts]
   18 |             path[x] = i;
      |                  ^
memory.cpp:20:21: warning: array subscript has type 'char' [-Wchar-subscripts]
   20 |             if(path[x] == i - 1 && i % 2 == 0)
      |                     ^
memory.cpp:23:29: warning: array subscript has type 'char' [-Wchar-subscripts]
   23 |                 faceup(path[x]);
      |                             ^
memory.cpp:27:29: warning: array subscript has type 'char' [-Wchar-subscripts]
   27 |                 faceup(path[x]);
      |                             ^
memory.cpp:9:29: warning: unused variable 'nr' [-Wunused-variable]
    9 |     int ap[100], path[100], nr;
      |                             ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...