#include "Memory_lib.h"
#include <bits/stdc++.h>
using namespace std;
int Memory(int N, int M) {
int day = M / 10000;
char ith;
if(day + 1 > N)
{
ith = Get(1);
return -2;
}
else
{
ith = Get(day + 1);
}
if(ith == '<')
{
M += 100;
}
else if(ith == '>')
{
M -= 100;
}
else if(ith == '[')
{
M +=1;
}
else if(ith == ']')
{
M -=1;
}
M += 10000;
int trig = (M / 100) % 100;
int sqr = M % 100;
if(trig > 50 || sqr > 50)
{
return -2;
}
if(day + 1 == N)
{
if(M % 10000 == 0)
{
return -1;
}
else{return -2;}
}
return M;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1343 ms |
284060 KB |
Output is correct |
2 |
Correct |
1342 ms |
284220 KB |
Output is correct |
3 |
Incorrect |
1299 ms |
283988 KB |
Wrong Answer [6] |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1343 ms |
284060 KB |
Output is correct |
2 |
Correct |
1342 ms |
284220 KB |
Output is correct |
3 |
Incorrect |
1299 ms |
283988 KB |
Wrong Answer [6] |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1343 ms |
284060 KB |
Output is correct |
2 |
Correct |
1342 ms |
284220 KB |
Output is correct |
3 |
Incorrect |
1299 ms |
283988 KB |
Wrong Answer [6] |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1343 ms |
284060 KB |
Output is correct |
2 |
Correct |
1342 ms |
284220 KB |
Output is correct |
3 |
Incorrect |
1299 ms |
283988 KB |
Wrong Answer [6] |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1322 ms |
284076 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1343 ms |
284060 KB |
Output is correct |
2 |
Correct |
1342 ms |
284220 KB |
Output is correct |
3 |
Incorrect |
1299 ms |
283988 KB |
Wrong Answer [6] |
4 |
Halted |
0 ms |
0 KB |
- |