結果
| 問題 |
No.231 めぐるはめぐる (1)
|
| コンテスト | |
| ユーザー |
Kmcode1
|
| 提出日時 | 2015-06-27 00:03:18 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 1,015 bytes |
| コンパイル時間 | 741 ms |
| コンパイル使用メモリ | 94,412 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 23:34:21 |
| 合計ジャッジ時間 | 1,481 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:35:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
35 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
main.cpp:37:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
37 | scanf("%lld%lld", &g[i], &d[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<cctype>
#include<cstdlib>
#include<algorithm>
#include<bitset>
#include<vector>
#include<list>
#include<deque>
#include<queue>
#include<map>
#include<set>
#include<stack>
#include<cmath>
#include<sstream>
#include<fstream>
#include<iomanip>
#include<ctime>
#include<complex>
#include<functional>
#include<climits>
#include<cassert>
#include<iterator>
#include<unordered_map>
using namespace std;
#define MAX 1002
int n;
long long int g[MAX];
long long int d[MAX];
long long int m[MAX];
long long int want = 30000LL;
int main(){
scanf("%d", &n);
for (int i = 0; i < n; i++){
scanf("%lld%lld", &g[i], &d[i]);
m[i] = g[i] - d[i] * 30000LL;
}
long long int maxt = INT_MIN;
int ind = 0;
for (int i = 0; i < n; i++){
if (maxt < m[i]){
maxt = m[i];
ind = i;
}
}
if (maxt * 6LL >= want*100LL){
cout << "YES" << endl;
for (int i = 0; i < 6; i++){
cout << ind + 1 << endl;
}
}
else{
puts("NO");
}
return 0;
}
Kmcode1