提出 #75930997


ソースコード 拡げる

#include <iostream>
#include<set>

using namespace std;

int Q;
long long X, A[100000],B[100000];
set<long long> S;

int main() {
	cin >> X;
	S.insert(X);
	auto a = S.begin();
	cin >> Q;
	for (int q = 0; Q > q; ++q) {
		cin >> A[q] >> B[q];
		S.insert(A[q]);
		S.insert(B[q]);
		if (*a < A[q] and *a < B[q])
			a++;
		else if(*a >= A[q] and *a >= B[q])
			a--;
		cout << *a << endl;
	}
}

提出情報

提出日時
問題 D - Chalkboard Median
ユーザ auaahks
言語 C++23 (GCC 15.2.0)
得点 0
コード長 411 Byte
結果 RE
実行時間 240 ms
メモリ 14360 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 0 / 400
結果
AC × 3
AC × 4
WA × 5
RE × 16
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 01_random_21.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3408 KiB
00_sample_01.txt AC 1 ms 3412 KiB
00_sample_02.txt AC 1 ms 3344 KiB
01_random_00.txt WA 75 ms 4996 KiB
01_random_01.txt WA 74 ms 5036 KiB
01_random_02.txt WA 77 ms 4948 KiB
01_random_03.txt RE 214 ms 14248 KiB
01_random_04.txt RE 215 ms 14088 KiB
01_random_05.txt RE 183 ms 4784 KiB
01_random_06.txt RE 235 ms 14360 KiB
01_random_07.txt RE 235 ms 14256 KiB
01_random_08.txt RE 236 ms 14156 KiB
01_random_09.txt RE 236 ms 14088 KiB
01_random_10.txt AC 123 ms 12468 KiB
01_random_11.txt RE 237 ms 14288 KiB
01_random_12.txt WA 96 ms 7880 KiB
01_random_13.txt WA 92 ms 7152 KiB
01_random_14.txt RE 205 ms 7404 KiB
01_random_15.txt RE 209 ms 7836 KiB
01_random_16.txt RE 236 ms 14316 KiB
01_random_17.txt RE 240 ms 14256 KiB
01_random_18.txt RE 222 ms 11768 KiB
01_random_19.txt RE 220 ms 11808 KiB
01_random_20.txt RE 219 ms 11712 KiB
01_random_21.txt RE 228 ms 11816 KiB