Submission #328353

#TimeUsernameProblemLanguageResultExecution timeMemory
328353seedkinOn the Grid (FXCUP4_grid)C++17
0 / 100
1 ms492 KiB
#include "grid.h" int candi[1005][1005]; std::vector<int> SortDisks(int N) { std::vector<int> disks; // i번째로 넣을 막대,(막대 번호) std::vector<int> ans; // i번째 막대의 길이, a[i] = N int result; disks.resize(N); ans.resize(N); for(int i = 0; i <= N; i++) { for(int j = 0; j <= N; j++) { candi[i][j] = 1; } } for(int i = 0; i < N; i++) { disks[i] = i; } for(int i = 0; i < N; i++) { int result = PutDisks(disks); if(result == N) { // return case } int diff = result - N; for(int j = 0; j < N; j++ ) { for(int l = N - diff - j; l >=0; l--) { candi[disks[j]][N-j] = 0; } } } return ans; }

Compilation message (stderr)

grid.cpp: In function 'std::vector<int> SortDisks(int)':
grid.cpp:8:6: warning: unused variable 'result' [-Wunused-variable]
    8 |  int result;
      |      ^~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...