Submission #8461412


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;

#define REP(i,n) for(long long i = 0; i < (n); i++)
#define FOR(i, m, n) for(long long i = (m);i < (n); ++i)
#define ALL(obj) (obj).begin(),(obj).end()
#define SPEED cin.tie(0);ios::sync_with_stdio(false);

template<class T> using V = vector<T>;
template<class T, class U> using P = pair<T, U>;
template<class T> using PQ = priority_queue<T>;
template<class T> using PQR = priority_queue<T,vector<T>,greater<T>>;

constexpr long long MOD = (long long)1e9 + 7;
constexpr long long MOD2 = 998244353;
constexpr long long HIGHINF = (long long)1e18;
constexpr long long LOWINF = (long long)1e15;
constexpr long double PI = 3.1415926535897932384626433;

template <class T> vector<T> make_v(size_t N,T init){return vector<T>(N,init);}
template <class... T> auto make_v(size_t N,T... t){return vector<decltype(make_v(t...))>(N,make_v(t...));}
template <class T> void corner(bool flg, T hoge) {if (flg) {cout << hoge << endl; exit(0);}}
template <class T, class U>ostream &operator<<(ostream &o, const map<T, U>&obj) {o << "{"; for (auto &x : obj) o << " {" << x.first << " : " << x.second << "}" << ","; o << " }"; return o;}
template <class T>ostream &operator<<(ostream &o, const set<T>&obj) {o << "{"; for (auto itr = obj.begin(); itr != obj.end(); ++itr) o << (itr != obj.begin() ? ", " : "") << *itr; o << "}"; return o;}
template <class T>ostream &operator<<(ostream &o, const multiset<T>&obj) {o << "{"; for (auto itr = obj.begin(); itr != obj.end(); ++itr) o << (itr != obj.begin() ? ", " : "") << *itr; o << "}"; return o;}
template <class T>ostream &operator<<(ostream &o, const vector<T>&obj) {o << "{"; for (int i = 0; i < (int)obj.size(); ++i)o << (i > 0 ? ", " : "") << obj[i]; o << "}"; return o;}
template <class T, class U>ostream &operator<<(ostream &o, const pair<T, U>&obj) {o << "{" << obj.first << ", " << obj.second << "}"; return o;}
template <template <class tmp>  class T, class U> ostream &operator<<(ostream &o, const T<U> &obj) {o << "{"; for (auto itr = obj.begin(); itr != obj.end(); ++itr)o << (itr != obj.begin() ? ", " : "") << *itr; o << "}"; return o;}
void print(void) {cout << endl;}
template <class Head> void print(Head&& head) {cout << head;print();}
template <class Head, class... Tail> void print(Head&& head, Tail&&... tail) {cout << head << " ";print(forward<Tail>(tail)...);}
template <class T> void chmax(T& a, const T b){a=max(a,b);}
template <class T> void chmin(T& a, const T b){a=min(a,b);}
void YN(bool flg) {cout << (flg ? "YES" : "NO") << endl;}
void Yn(bool flg) {cout << (flg ? "Yes" : "No") << endl;}
void yn(bool flg) {cout << (flg ? "yes" : "no") << endl;}

int main() {
	int N; cin >> N;
	string S; cin >> S;
	int R=0,G=0,B=0;
	for(int i = 0; i < N; ++i) {
		if(S[i]=='R') R++;
		if(S[i]=='G') G++;
		if(S[i]=='B') B++;
	}
	cout << R%2+G%2+B%2 << endl;
	return 0;
}

Submission Info

Submission Time
Task C - 魂の還る場所
User ningenMe
Language C++14 (GCC 5.4.1)
Score 100
Code Size 2968 Byte
Status AC
Exec Time 7 ms
Memory 764 KB

Judge Result

Set Name part1 part2
Score / Max Score 30 / 30 70 / 70
Status
AC × 39
AC × 72
Set Name Test Cases
part1 level1/level1_00_sample_01.txt, level1/level1_00_sample_02.txt, level1/level1_01_max_01.txt, level1/level1_01_max_02.txt, level1/level1_01_max_03.txt, level1/level1_01_min2.txt, level1/level1_01_min_01.txt, level1/level1_01_min_02.txt, level1/level1_01_min_03.txt, level1/level1_02_rand_00.txt, level1/level1_02_rand_01.txt, level1/level1_02_rand_02.txt, level1/level1_02_rand_03.txt, level1/level1_02_rand_04.txt, level1/level1_02_rand_05.txt, level1/level1_02_rand_06.txt, level1/level1_02_rand_07.txt, level1/level1_02_rand_08.txt, level1/level1_02_rand_09.txt, level1/level1_02_rand_10.txt, level1/level1_02_rand_11.txt, level1/level1_02_rand_12.txt, level1/level1_02_rand_13.txt, level1/level1_02_rand_14.txt, level1/level1_03_rand_00.txt, level1/level1_03_rand_01.txt, level1/level1_03_rand_02.txt, level1/level1_03_rand_03.txt, level1/level1_03_rand_04.txt, level1/level1_03_rand_05.txt, level1/level1_03_rand_06.txt, level1/level1_03_rand_07.txt, level1/level1_03_rand_08.txt, level1/level1_03_rand_09.txt, level1/level1_03_rand_10.txt, level1/level1_03_rand_11.txt, level1/level1_03_rand_12.txt, level1/level1_03_rand_13.txt, level1/level1_03_rand_14.txt
part2 level1/level1_00_sample_01.txt, level1/level1_00_sample_02.txt, level1/level1_01_max_01.txt, level1/level1_01_max_02.txt, level1/level1_01_max_03.txt, level1/level1_01_min2.txt, level1/level1_01_min_01.txt, level1/level1_01_min_02.txt, level1/level1_01_min_03.txt, level1/level1_02_rand_00.txt, level1/level1_02_rand_01.txt, level1/level1_02_rand_02.txt, level1/level1_02_rand_03.txt, level1/level1_02_rand_04.txt, level1/level1_02_rand_05.txt, level1/level1_02_rand_06.txt, level1/level1_02_rand_07.txt, level1/level1_02_rand_08.txt, level1/level1_02_rand_09.txt, level1/level1_02_rand_10.txt, level1/level1_02_rand_11.txt, level1/level1_02_rand_12.txt, level1/level1_02_rand_13.txt, level1/level1_02_rand_14.txt, level1/level1_03_rand_00.txt, level1/level1_03_rand_01.txt, level1/level1_03_rand_02.txt, level1/level1_03_rand_03.txt, level1/level1_03_rand_04.txt, level1/level1_03_rand_05.txt, level1/level1_03_rand_06.txt, level1/level1_03_rand_07.txt, level1/level1_03_rand_08.txt, level1/level1_03_rand_09.txt, level1/level1_03_rand_10.txt, level1/level1_03_rand_11.txt, level1/level1_03_rand_12.txt, level1/level1_03_rand_13.txt, level1/level1_03_rand_14.txt, level2/level2_01_max_01.txt, level2/level2_01_max_02.txt, level2/level2_01_max_03.txt, level2/level2_02_rand_00.txt, level2/level2_02_rand_01.txt, level2/level2_02_rand_02.txt, level2/level2_02_rand_03.txt, level2/level2_02_rand_04.txt, level2/level2_02_rand_05.txt, level2/level2_02_rand_06.txt, level2/level2_02_rand_07.txt, level2/level2_02_rand_08.txt, level2/level2_02_rand_09.txt, level2/level2_02_rand_10.txt, level2/level2_02_rand_11.txt, level2/level2_02_rand_12.txt, level2/level2_02_rand_13.txt, level2/level2_02_rand_14.txt, level2/level2_03_rand_00.txt, level2/level2_03_rand_01.txt, level2/level2_03_rand_02.txt, level2/level2_03_rand_03.txt, level2/level2_03_rand_04.txt, level2/level2_03_rand_05.txt, level2/level2_03_rand_06.txt, level2/level2_03_rand_07.txt, level2/level2_03_rand_08.txt, level2/level2_03_rand_09.txt, level2/level2_03_rand_10.txt, level2/level2_03_rand_11.txt, level2/level2_03_rand_12.txt, level2/level2_03_rand_13.txt, level2/level2_03_rand_14.txt
Case Name Status Exec Time Memory
level1/level1_00_sample_01.txt AC 7 ms 764 KB
level1/level1_00_sample_02.txt AC 1 ms 256 KB
level1/level1_01_max_01.txt AC 1 ms 256 KB
level1/level1_01_max_02.txt AC 1 ms 256 KB
level1/level1_01_max_03.txt AC 1 ms 256 KB
level1/level1_01_min2.txt AC 1 ms 256 KB
level1/level1_01_min_01.txt AC 1 ms 256 KB
level1/level1_01_min_02.txt AC 1 ms 256 KB
level1/level1_01_min_03.txt AC 1 ms 256 KB
level1/level1_02_rand_00.txt AC 1 ms 256 KB
level1/level1_02_rand_01.txt AC 1 ms 256 KB
level1/level1_02_rand_02.txt AC 1 ms 256 KB
level1/level1_02_rand_03.txt AC 1 ms 256 KB
level1/level1_02_rand_04.txt AC 1 ms 256 KB
level1/level1_02_rand_05.txt AC 1 ms 256 KB
level1/level1_02_rand_06.txt AC 1 ms 256 KB
level1/level1_02_rand_07.txt AC 1 ms 256 KB
level1/level1_02_rand_08.txt AC 1 ms 256 KB
level1/level1_02_rand_09.txt AC 1 ms 256 KB
level1/level1_02_rand_10.txt AC 1 ms 256 KB
level1/level1_02_rand_11.txt AC 1 ms 256 KB
level1/level1_02_rand_12.txt AC 1 ms 256 KB
level1/level1_02_rand_13.txt AC 1 ms 256 KB
level1/level1_02_rand_14.txt AC 1 ms 256 KB
level1/level1_03_rand_00.txt AC 1 ms 256 KB
level1/level1_03_rand_01.txt AC 1 ms 256 KB
level1/level1_03_rand_02.txt AC 1 ms 256 KB
level1/level1_03_rand_03.txt AC 1 ms 256 KB
level1/level1_03_rand_04.txt AC 1 ms 256 KB
level1/level1_03_rand_05.txt AC 1 ms 256 KB
level1/level1_03_rand_06.txt AC 1 ms 256 KB
level1/level1_03_rand_07.txt AC 1 ms 256 KB
level1/level1_03_rand_08.txt AC 1 ms 256 KB
level1/level1_03_rand_09.txt AC 1 ms 256 KB
level1/level1_03_rand_10.txt AC 1 ms 256 KB
level1/level1_03_rand_11.txt AC 1 ms 256 KB
level1/level1_03_rand_12.txt AC 1 ms 256 KB
level1/level1_03_rand_13.txt AC 1 ms 256 KB
level1/level1_03_rand_14.txt AC 1 ms 256 KB
level2/level2_01_max_01.txt AC 1 ms 256 KB
level2/level2_01_max_02.txt AC 1 ms 256 KB
level2/level2_01_max_03.txt AC 1 ms 256 KB
level2/level2_02_rand_00.txt AC 1 ms 256 KB
level2/level2_02_rand_01.txt AC 1 ms 256 KB
level2/level2_02_rand_02.txt AC 1 ms 256 KB
level2/level2_02_rand_03.txt AC 1 ms 256 KB
level2/level2_02_rand_04.txt AC 1 ms 256 KB
level2/level2_02_rand_05.txt AC 1 ms 256 KB
level2/level2_02_rand_06.txt AC 1 ms 256 KB
level2/level2_02_rand_07.txt AC 1 ms 256 KB
level2/level2_02_rand_08.txt AC 1 ms 256 KB
level2/level2_02_rand_09.txt AC 1 ms 256 KB
level2/level2_02_rand_10.txt AC 1 ms 256 KB
level2/level2_02_rand_11.txt AC 1 ms 256 KB
level2/level2_02_rand_12.txt AC 1 ms 256 KB
level2/level2_02_rand_13.txt AC 1 ms 256 KB
level2/level2_02_rand_14.txt AC 1 ms 256 KB
level2/level2_03_rand_00.txt AC 1 ms 256 KB
level2/level2_03_rand_01.txt AC 1 ms 256 KB
level2/level2_03_rand_02.txt AC 1 ms 256 KB
level2/level2_03_rand_03.txt AC 1 ms 256 KB
level2/level2_03_rand_04.txt AC 1 ms 256 KB
level2/level2_03_rand_05.txt AC 1 ms 256 KB
level2/level2_03_rand_06.txt AC 1 ms 256 KB
level2/level2_03_rand_07.txt AC 1 ms 256 KB
level2/level2_03_rand_08.txt AC 1 ms 256 KB
level2/level2_03_rand_09.txt AC 1 ms 256 KB
level2/level2_03_rand_10.txt AC 1 ms 256 KB
level2/level2_03_rand_11.txt AC 1 ms 256 KB
level2/level2_03_rand_12.txt AC 1 ms 256 KB
level2/level2_03_rand_13.txt AC 1 ms 256 KB
level2/level2_03_rand_14.txt AC 1 ms 256 KB