結果
問題 |
No.3065 Speedrun (Normal)
|
ユーザー |
![]() |
提出日時 | 2025-03-21 21:26:12 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 790 bytes |
コンパイル時間 | 4,308 ms |
コンパイル使用メモリ | 254,720 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-21 21:26:17 |
合計ジャッジ時間 | 5,014 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 13 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:36:41: warning: ‘T’ may be used uninitialized [-Wmaybe-uninitialized] 36 | cout << (tot <= T ? "Yes" : "No") << endl; | ^ main.cpp:22:12: note: ‘T’ was declared here 22 | ll T; | ^
ソースコード
#include"bits/stdc++.h" #include"atcoder/all" #define chmin(x,y) (x) = min((x),(y)) #define chmax(x,y) (x) = max((x),(y)) #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define vec vector #define all(a) a.begin(), a.end() #define pb push_back using namespace std; using namespace atcoder; using ll = long long; using ld = long double; const ll mod = 998244353; using mint = modint998244353; using Graph = vector<vector<pair<int,ll>>>; const vector<int> dx = {1,0,-1,0}, dy = {0,1,0,-1}; int main(){ // input vector<pair<ll,ll>> A(4); ll T; const int N = 4; rep(i,N){ ll a; cin >> a; A[i].second = a; } rep(i,N){ ll a; cin >> a; A[i].first = a; } sort(all(A)); ll tot = 0; rep(i,N) tot += A[i].first * A[i].second; cout << (tot <= T ? "Yes" : "No") << endl; }