제출 #372545

#제출 시각아이디문제언어결과실행 시간메모리
372545AlexRex0Memory (IOI10_memory)C++14
0 / 100
2 ms256 KiB
#include "grader.h"
#include "memory.h"

void play() {
    char arre[52];
    bool encontre[52];
    for(int i = 1; i <= 50; ++i){
        encontre[i] = false;
    }
    int n = 50;
    for(int i = 1; i <= n; ++i){
        arre[i] = faceup(i);
        if(arre[i] == arre[i - 1]){
            encontre[i] = true;
            encontre[i - 1] = true;
        }
    }
    char a, b;
    for(int i = 1; i <= n; ++i){
        if(!encontre[i]){
            for(int j = i + 1; j <= n; ++j){
                if(arre[i] == arre[j]){
                    a = faceup(i);
                    b = faceup(j);
                    encontre[i] = true;
                    encontre[j] = true;
                }
            }
        }
    }
}

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

memory.cpp: In function 'void play()':
memory.cpp:18:10: warning: variable 'a' set but not used [-Wunused-but-set-variable]
   18 |     char a, b;
      |          ^
memory.cpp:18:13: warning: variable 'b' set but not used [-Wunused-but-set-variable]
   18 |     char a, b;
      |             ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...