結果

問題 No.647 明太子
ユーザー gotutiyangotutiyan
提出日時 2018-02-09 22:48:31
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,070 bytes
コンパイル時間 1,555 ms
コンパイル使用メモリ 85,508 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-27 02:17:24
合計ジャッジ時間 2,004 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,384 KB
testcase_02 WA -
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,384 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 3 ms
4,380 KB
testcase_10 AC 3 ms
4,380 KB
testcase_11 AC 2 ms
4,376 KB
testcase_12 AC 3 ms
4,380 KB
testcase_13 AC 4 ms
4,380 KB
testcase_14 AC 29 ms
4,376 KB
testcase_15 AC 6 ms
4,380 KB
testcase_16 AC 3 ms
4,380 KB
testcase_17 AC 35 ms
4,380 KB
testcase_18 AC 38 ms
4,376 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 22 ms
4,380 KB
testcase_23 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <functional>
#include <queue>
#include <cmath>
#include <set>
#include <map>

#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
#define Sort(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define vi vector<int>
#define INF (int)1e933
#define INFL 1e18
#define MOD 1e9+7
#define pb push_back
#define MP make_pair
typedef long long ll;
typedef std::pair<int,int> pii;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};

using namespace std;

int main() {
    int n;cin>>n;
    vector<pair<int,int>> v(n);
    rep(i,0,n)cin>>v[i].fi>>v[i].se;
    int m;cin>>m;
    vector<pair<int,int>> vv(m);
    rep(i,0,m)cin>>vv[i].fi>>vv[i].se;
    
    vector<int> ct(m,0);
    rep(j,0,n){
        rep(i,0,m){
            if(vv[i].fi<=v[j].fi&&v[j].se<=vv[i].se)ct[i]++;
        }
    }
    
    int ans=0;
    rep(i,0,m)ans=max(ans,ct[i]);
    rep(i,0,m){
        if(ans==ct[i])cout<<i+1<<endl;
    }
    return 0;
}
0