提出 #372123


ソースコード 拡げる

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using namespace std;
int main(){
	int T;
	cin>>T;
	rep(i,T){
		string s;
		cin>>s;
		int p=0;
		rep(i,10) for(int j=i+1;j<10;j++) if(s[i]>s[j]) p++;
		cout<<p%2<<endl;
	}
}

提出情報

提出日時
問題 F - チェックディジット
ユーザ SAT3
言語 C++11 (GCC 4.9.2)
得点 200
コード長 510 Byte
結果 AC
実行時間 504 ms
メモリ 928 KiB

ジャッジ結果

セット名 Subtask00 Subtask01 Subtask02 Subtask03 Subtask04 Subtask05 Subtask06 Subtask07
得点 / 配点 25 / 25 25 / 25 25 / 25 25 / 25 25 / 25 25 / 25 25 / 25 25 / 25
結果
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
セット名 テストケース
Subtask00 00_n_3e1
Subtask01 01_n_1e2
Subtask02 02_n_3e2
Subtask03 03_n_1e3
Subtask04 04_n_3e3
Subtask05 05_n_1e4
Subtask06 06_n_3e4
Subtask07 07_n_1e5
ケース名 結果 実行時間 メモリ
00_n_3e1 AC 26 ms 796 KiB
01_n_1e2 AC 23 ms 804 KiB
02_n_3e2 AC 26 ms 924 KiB
03_n_1e3 AC 30 ms 804 KiB
04_n_3e3 AC 40 ms 676 KiB
05_n_1e4 AC 68 ms 804 KiB
06_n_3e4 AC 185 ms 928 KiB
07_n_1e5 AC 504 ms 800 KiB
sample AC 24 ms 924 KiB