結果

問題 No.785 色食い虫
ユーザー okkuukenkenokkuukenken
提出日時 2022-07-22 14:50:31
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 889 bytes
コンパイル時間 1,198 ms
コンパイル使用メモリ 130,616 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-16 23:46:30
合計ジャッジ時間 2,531 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 1 ms
4,376 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 1 ms
4,380 KB
testcase_15 AC 1 ms
4,376 KB
testcase_16 AC 1 ms
4,376 KB
testcase_17 AC 1 ms
4,376 KB
testcase_18 AC 1 ms
4,380 KB
testcase_19 AC 2 ms
4,380 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 1 ms
4,376 KB
testcase_22 AC 1 ms
4,376 KB
testcase_23 AC 1 ms
4,380 KB
testcase_24 AC 2 ms
4,376 KB
testcase_25 AC 2 ms
4,380 KB
testcase_26 AC 2 ms
4,376 KB
testcase_27 AC 2 ms
4,376 KB
testcase_28 AC 1 ms
4,376 KB
testcase_29 AC 1 ms
4,376 KB
testcase_30 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
#include<string>
#include<iomanip>
#include<numeric>
#include<queue>
#include<deque>
#include<stack>
#include<set>
#include<map>
#include<random>
using namespace std;
typedef long long ll;
const int mod=998244353;
bool r[16],g[16],b[16];
int main(){
	string sr,sg,sb;
	cin>>sr>>sg>>sb;
	for(int i=0;i<16;i++)
		r[i]=g[i]=b[i]=1;
	for(auto x:sr){
		if(sr=="NONE")
			break;
		if('0'<=x&&x<='9')
			r[x-'0']=0;
		if('A'<=x&&x<='F')
			r[x-'A'+10]=0;
	}
	for(auto x:sg){
		if(sg=="NONE")
			break;
		if('0'<=x&&x<='9')
			g[x-'0']=0;
		if('A'<=x&&x<='F')
			g[x-'A'+10]=0;
	}
	for(auto x:sb){
		if(sb=="NONE")
			break;
		if('0'<=x&&x<='9')
			b[x-'0']=0;
		if('A'<=x&&x<='F')
			b[x-'A'+10]=0;
	}
	int cr=count(r,r+16,1),cg=count(g,g+16,1),cb=count(b,b+16,1);
	cout<<cr*cr*cg*cg*cb*cb<<endl;
}
0