답안 #1066113

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
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;
}
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -