Submission #282159

# Submission time Handle Problem Language Result Execution time Memory
282159 2020-08-24T05:03:01 Z 최은수(#5756) None (JOI15_memory) C++17
10 / 100
3039 ms 283848 KB
#include"Memory_lib.h"
#include<iostream>
#include<vector>
#include<algorithm>
#define ep emplace
#define eb emplace_back
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
typedef pair<int,int>pi;
typedef pair<ll,ll>pl;
const int inf=1e9+7;
const ll INF=1e18;
int Memory(int N,int M)
{
    if(N%2==1)
        return-2;
    int cur=M/128;
    int csz=M%128;
    if(cur>=N||csz>cur)
        return-2;
    char c=Get(cur+1);
    if(c=='<')
        csz++;
    else
        csz--;
    if(csz<0)
        return-2;
    if(cur==N-1)
        return csz==0?-1:-2;
    return csz+(cur+1)*128;
}
# Verdict Execution time Memory Grader output
1 Correct 2842 ms 283848 KB Output is correct
2 Incorrect 3039 ms 283768 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2842 ms 283848 KB Output is correct
2 Incorrect 3039 ms 283768 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2842 ms 283848 KB Output is correct
2 Incorrect 3039 ms 283768 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2842 ms 283848 KB Output is correct
2 Incorrect 3039 ms 283768 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2898 ms 283708 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2842 ms 283848 KB Output is correct
2 Incorrect 3039 ms 283768 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -