結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
sorag
|
| 提出日時 | 2022-08-09 11:39:30 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 482 bytes |
| 記録 | |
| コンパイル時間 | 1,497 ms |
| コンパイル使用メモリ | 203,024 KB |
| 実行使用メモリ | 7,976 KB |
| 最終ジャッジ日時 | 2026-04-08 05:47:15 |
| 合計ジャッジ時間 | 2,358 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 9 |
ソースコード
#include <iostream>
#include <vector>
#include <map>
#include<string>
#include<queue>
#include<math.h>
#define ll long long
#define P pair<int,int>
#define lP pait<ll,ll>
using namespace std;
int main() {
ll h,n;
ll ans=0;
cin>>h>>n;
vector<ll> a(n);
for(int i=0;i<n-1;i++){
cin>>a[i];
}
a[n-1]=h;
sort(a.begin(),a.end(),greater<>());
for(int i=0;i<n;i++){
if(a[i]==h) ans=i+1;
}
cout<<ans<<endl;
return 0;
}
sorag