結果

問題 No.871 かえるのうた
ユーザー d_seid_sei
提出日時 2019-09-05 11:35:21
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 771 bytes
コンパイル時間 1,623 ms
コンパイル使用メモリ 83,192 KB
実行使用メモリ 8,768 KB
最終ジャッジ日時 2023-08-31 01:32:44
合計ジャッジ時間 10,104 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
8,760 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,384 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 2 ms
4,384 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 13 ms
4,388 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include <vector>
#include<cmath>
#include<iomanip>
#include<queue>
using namespace std;
typedef long long int lont;
int main() {
	lont N, K;
	cin >> N >> K;
	vector<lont>veca(N);
	vector<lont>vecb(N);
	for (int ia = 0; ia < N; ia++) {
		cin >> veca.at(ia);
	}
	for (int ib = 0; ib < N; ib++) {
		cin >> vecb.at(ib);
	}
	vector<lont>vecc(N);
	vecc.at(K - 1)++;
	for(int ie=0;ie<10;ie++){
		for (int ic = 0; ic < N; ic++) {
			for (int id = 0; id < N; id++) {
				if (vecc.at(ic) &&
					veca.at(ic) - vecb.at(ic) <= veca.at(id) &&
					veca.at(id) <= veca.at(ic) + vecb.at(ic)) {
					vecc.at(id)++;
				}
			}
		}
		}
	int cnt = 0;
	for (int ih = 0; ih < N; ih++) {
		if (vecc.at(ih)) {
			cnt++;
		}
	}
	cout << cnt << endl;
}

	
0