結果

問題 No.647 明太子
ユーザー SotaSota
提出日時 2024-03-06 12:41:20
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 1,420 bytes
コンパイル時間 37 ms
最終ジャッジ日時 2024-09-29 18:16:25
合計ジャッジ時間 764 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
f2ccee56bbf6
[/j_bin/judge_tool judge 0 30000 ../CompileMemory.txt /dev/null sud /dev/null _ g++-12 -I /boost_git/ -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out main.cpp]
open /home/yuki2006/gopath/src/yukicoder/judge/lang/lang.csv: no such file or directory
goroutine 1 [running]:
runtime/debug.Stack()
	/usr/local/go/src/runtime/debug/stack.go:24 +0x5e
main.main.func1()
	/home/yuki2006/gopath/src/yukicoder/judge/main.go:20 +0x57
panic({0x7661e0?, 0xc000070b70?})
	/usr/local/go/src/runtime/panic.go:770 +0x132
yukicoder/env.InitLangCommands(0x0)
	/home/yuki2006/gopath/src/yukicoder/env/lang.go:57 +0x3a5
main.main()
	/home/yuki2006/gopath/src/yukicoder/judge/main.go:42 +0x65

ソースコード

diff #
プレゼンテーションモードにする

#define _USE_MATH_DEFINES
#include <iostream> //cin, cout
#include <vector> //vector
#include <algorithm> //sort,min,max,count
#include <string> //string,getline, to_string
#include <cstdlib> //abs(int)
#include <utility> //swap, pair
#include <tuple> //tuple
#include <deque> //deque
#include <climits> //INT_MAX
#include <bitset> //bitset
#include <cmath> //sqrt, ceil. M_PI, pow, sin
#include <ios> //fixed
#include <iomanip> //setprecision
#include <sstream> //stringstream
#include <numeric> //gcd, assumlate
#include <random> //randam_device
#include <limits> //numeric_limits
#include <functional>
using namespace std;
constexpr long long int D_MOD = 1000000007;
int main() {
int N;
cin >> N;
int Amax = 0;
int Bmin = INT_MAX;
vector<int> A(N), B(N);
for (int i = 0; i < N; i++) {
cin >> A.at(i) >> B.at(i);
if (Amax < A.at(i)) {
Amax = A.at(i);
}
if (Bmin > B.at(i)) {
Bmin = B.at(i);
}
}
int M, X, Y;
cin >> M;
vector<int> C(M, 0);
for (int i = 0; i < M; i++) {
cin >> X >> Y;
if (X > Amax) {
continue;
}
if (Y < Bmin) {
continue;
}
for (int j = 0; j < N; j++) {
if (X <= A.at(j) && Y >= B.at(j)) {
C.at(i)++;
}
}
}
int max = *max_element(C.begin(), C.end());
if (max == 0) {
cout << 0 << endl;
return 0;
}
for (int i = 0; i < M; i++) {
if (C.at(i) == max) {
cout << i + 1 << endl;
}
}
return 0;
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0