Submission #1037208

# Submission time Handle Problem Language Result Execution time Memory
1037208 2024-07-28T10:43:25 Z clementine None (JOI15_memory) C++17
10 / 100
1336 ms 284212 KB
#include "Memory_lib.h"
#include <bits/stdc++.h>
using namespace std;


int Memory(int N, int M) {

  int day = (M % 1000000)/ 10000;
  char ith;

  if(day % 100 ==0 && M !=0 && N == 100)
  {
    ith = Get(100);
  }
  else if(day + 1 > N)
  {
    ith = Get(1);
    return -2;
  }
  else
  {
    ith = Get(day + 1);
  }

  int type = M / 1000000;
  M = M %1000000;
  if(ith == '<')
  {
    M += 100;
  }
  else if(ith == '>')
  {
    if(type ==2 )
    {
      return -2;
    }
    M -= 100;
    M +=1000000;
  }
  else if(ith == '[')
  {
    M +=1;
    M +=2000000;
  }
  else if(ith == ']')
  {
    if(type == 0)
    {
      return -2;
    }
    M -=1;
    M +=3000000;
  }
  
  M += 10000;
  //cout << M << '\n';
  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;
}
# Verdict Execution time Memory Grader output
1 Correct 1336 ms 284212 KB Output is correct
2 Correct 1294 ms 283984 KB Output is correct
3 Incorrect 1232 ms 283988 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1336 ms 284212 KB Output is correct
2 Correct 1294 ms 283984 KB Output is correct
3 Incorrect 1232 ms 283988 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1336 ms 284212 KB Output is correct
2 Correct 1294 ms 283984 KB Output is correct
3 Incorrect 1232 ms 283988 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1336 ms 284212 KB Output is correct
2 Correct 1294 ms 283984 KB Output is correct
3 Incorrect 1232 ms 283988 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1332 ms 283980 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1336 ms 284212 KB Output is correct
2 Correct 1294 ms 283984 KB Output is correct
3 Incorrect 1232 ms 283988 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -