Submission #1066113

# Submission time Handle Problem Language Result Execution time Memory
1066113 2024-08-19T15:09:10 Z NemanjaSo2005 Tricolor Lights (JOI24_tricolor) C++17
0 / 100
30 ms 1376 KB
#include "Anna.h"
#include<bits/stdc++.h>
#define ll long long
using namespace std;
char diff(char a,char b){
   if(a>b)
      swap(a,b);
   if(a=='R' and b=='G')
      return 'B';
   if(a=='R' and b=='B')
      return 'G';
   return 'R';
}
pair<string, int> anna(int n, string s) {
   string T;
   int N=n;
   string S=s;
   for(int i=0;i<N;i++)
      if(S[i]=='R')
         T.push_back('G');
      else
         T.push_back('R');
   if(N<=10)
      return {T,N};
   T[1]=T[N-1]=diff(s[1],s.back());
   T[N-2]=diff(s[N-2],T[0]);
   return {T,N-1};
}
#include "Anna.h"
#include<bits/stdc++.h>
#define ll long long
using namespace std;
namespace {
   int N,L;
};
void init(int n, int l) {
   ::N=n;
   ::L=l;
}

int bruno(string s){
   if(::N == ::L)
      return 1;
   string S=s;
   if(S[0]==S.back())
      return 2;
   return 1;
}
# Verdict Execution time Memory Grader output
1 Correct 26 ms 1336 KB Output is correct
2 Correct 29 ms 1328 KB Output is correct
3 Correct 25 ms 1288 KB Output is correct
4 Incorrect 1 ms 856 KB Wrong Answer [3]
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 26 ms 1336 KB Output is correct
2 Correct 29 ms 1328 KB Output is correct
3 Correct 25 ms 1288 KB Output is correct
4 Incorrect 1 ms 856 KB Wrong Answer [3]
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 26 ms 1336 KB Output is correct
2 Correct 29 ms 1328 KB Output is correct
3 Correct 25 ms 1288 KB Output is correct
4 Incorrect 1 ms 856 KB Wrong Answer [3]
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 26 ms 1336 KB Output is correct
2 Correct 29 ms 1328 KB Output is correct
3 Correct 25 ms 1288 KB Output is correct
4 Incorrect 1 ms 856 KB Wrong Answer [3]
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 26 ms 1376 KB Output is correct
2 Correct 26 ms 1288 KB Output is correct
3 Correct 30 ms 1340 KB Output is correct
4 Incorrect 1 ms 856 KB Wrong Answer [3]
5 Halted 0 ms 0 KB -