結果

問題 No.305 鍵(2)
ユーザー srup٩(๑`н´๑)۶srup٩(๑`н´๑)۶
提出日時 2016-05-31 20:39:32
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,642 bytes
コンパイル時間 519 ms
コンパイル使用メモリ 74,888 KB
実行使用メモリ 24,408 KB
平均クエリ数 92.00
最終ジャッジ日時 2023-09-23 10:44:28
合計ジャッジ時間 2,352 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 27 ms
23,724 KB
testcase_02 AC 29 ms
23,604 KB
testcase_03 AC 29 ms
24,408 KB
testcase_04 AC 29 ms
24,408 KB
testcase_05 AC 29 ms
23,448 KB
testcase_06 WA -
testcase_07 AC 29 ms
23,508 KB
testcase_08 AC 29 ms
24,024 KB
testcase_09 AC 29 ms
23,688 KB
testcase_10 AC 29 ms
24,324 KB
testcase_11 AC 28 ms
24,408 KB
testcase_12 AC 29 ms
24,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <bitset>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
using namespace std;
typedef long long ll;
typedef pair<int,int> pint;
typedef vector<int> vint;
typedef vector<pint> vpint;
#define mp make_pair
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,n) for (int i=(n)-1;i>=0;i--)
#define reps(i,f,n) for(int i=(f);i<(n);i++)
#define REPS(i,f,n) for (int i=(f)-1;i>=(n);i--)
int dx[4] = {1, 0, 0, -1};
int dy[4] = {0, 1, -1, 0};

int memo;
int ans[11] = {0};

void memozero(void){


	rep(k, 10){
		printf("0");
	}
	printf("\n");

	int num;
	string s;
	cin >> num >> s;	
	memo = num;	

}

int main(void){
	memozero();

	rep(i, 10){//どこを変えるか
		reps(j, 1, 10){//変えている数字

			if(i == 0)
				printf("%d000000000\n", j);
			else if (i == 1)
				printf("0%d00000000\n", j);
			else if (i == 2)
				printf("00%d0000000\n", j);
			else if (i == 3)
				printf("000%d000000\n", j);
			else if (i == 4)
				printf("0000%d00000\n", j);
			else if (i == 5)
				printf("00000%d0000\n", j);
			else if (i == 6)
				printf("000000%d000\n", j);
			else if (i == 7)
				printf("0000000%d00\n", j);
			else if (i == 8)
				printf("00000000%d0\n", j);
			else if (i == 9)
				printf("000000000%d\n", j);

			int n;
			string s;
			cin >> n >> s;	
			
			if (n > memo)
				ans[i] = j;
		}	
	}


	rep(i, 10){
		printf("%d", ans[i]);
	}
	printf("\n");
	return 0;
}
0