Submission #148337

#TimeUsernameProblemLanguageResultExecution timeMemory
148337JeffreyHo (#201)Play Onwards (FXCUP4_onward)C++17
14.29 / 100
11 ms1308 KiB
#include "make.h" std::string MakeWord(int N, int M, std::vector<std::string> Dict) { int x = 0, y = 0; for (int i = 0; i < N; i++) { bool b[102] = {}; for (int j = 0; j < M; j++) { for (int k = 0; k < N; k++) { if (Dict[k][j] != Dict[i][j] + 1) b[k] = 1; } } int c = 0; for (int j = 0; j < N; j++) c += b[j]; if (c > x) x = c, y = i; } for (int i = 0; i < M; i++) Dict[y][i]++; return Dict[y]; }
#include "guess.h" std::string GuessWord(int M, std::string YH){ for (int i = 0; i < M; i++) YH[i]++; return YH; }
#Verdict Execution timeMemoryGrader output
Fetching results...