結果

問題 No.3085 Easy Problems
コンテスト
ユーザー vjudge1
提出日時 2026-01-03 18:17:02
言語 C++23
(gcc 15.2.0 + boost 1.89.0)
結果
TLE  
実行時間 -
コード長 626 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,472 ms
コンパイル使用メモリ 340,104 KB
実行使用メモリ 20,720 KB
最終ジャッジ日時 2026-01-03 18:17:13
合計ジャッジ時間 9,263 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other TLE * 1 -- * 30
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

void solve(){
  
  ll n ; cin>>n;
  unordered_map<int,int> challenge;
  for(int i = 0 ; i < n; i++){
    int diff; cin >> diff;
    int typ ; cin>>typ;
    challenge.insert({diff,typ});
  }
  
  int heros; cin>>heros;
  
  for(int i = 0; i < heros; i++){
    int power; cin>>power;
    int weaknes ; cin>>weaknes;
    
    int count = 0 ;
    
    for(auto x : challenge){
      
      if(power >= x.first && x.second != weaknes) count++;
      
    }
    
    cout<<count<<endl;
    
  }
    
  
  
  
  
}


int main() 
{


    solve();
  
    return 0;
}
0