Submission #1037144

#TimeUsernameProblemLanguageResultExecution timeMemory
1037144DeathIsAwe기억 압축 (JOI15_memory)C++14
0 / 100
1307 ms283984 KiB
#include "Memory_lib.h" #include <bits/stdc++.h> using namespace std; int Memory(int n, int m) { if (n % 2 == 1) { return -2; } int bruh = 0, val; char now = Get(m % 100 + 1); if (now == '<') { bruh++; } bruh += (m / 100); if (2 * bruh < (m % 100 + 1)) { return -2; } if (m % 100 == n - 1) { if (2 * bruh == n) { return -1; } else { return -2; } } val = (m % 100) + (bruh * 100) + 1; if (val > 4194304) { val = 1/0; } return val; }

Compilation message (stderr)

memory.cpp: In function 'int Memory(int, int)':
memory.cpp:27:12: warning: division by zero [-Wdiv-by-zero]
   27 |     val = 1/0;
      |           ~^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...