提出 #372891


ソースコード 拡げる

#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,b) FOR(i,0,b)
#define F first
#define S second
#define PB push_back
#define BE(c) c.begin(),c.end()
using namespace std;
typedef long long LL;
typedef int ut;
typedef pair<ut,ut> pr;
typedef vector<ut> VI;
typedef vector<pr> Vpr;
const int SIZE=1010;
const int INF=1<<30;
int main(){
	int T;
	char str[100];
	cin >> T;
	REP(i,T){
		scanf("%s",str);
		int ans=0;
		REP(i,10)
			REP(j,i)	
				if(str[i]>str[j]) ans++;
		ans%=2;
		printf("%d\n",ans);
	}
	return 0;
}

提出情報

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

コンパイルエラー

./Main.cpp: In function ‘int main()’:
./Main.cpp:21:18: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("%s",str);
                  ^

ジャッジ結果

セット名 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 27 ms 676 KiB
01_n_1e2 AC 23 ms 676 KiB
02_n_3e2 AC 22 ms 804 KiB
03_n_1e3 AC 23 ms 920 KiB
04_n_3e3 AC 24 ms 800 KiB
05_n_1e4 AC 26 ms 804 KiB
06_n_3e4 AC 36 ms 796 KiB
07_n_1e5 AC 65 ms 920 KiB
sample AC 23 ms 800 KiB