結果
問題 |
No.2453 Seat Allocation
|
ユーザー |
|
提出日時 | 2023-09-01 23:23:29 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 679 bytes |
コンパイル時間 | 1,904 ms |
コンパイル使用メモリ | 168,804 KB |
実行使用メモリ | 818,036 KB |
最終ジャッジ日時 | 2025-01-03 12:17:11 |
合計ジャッジ時間 | 29,143 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 1 TLE * 1 MLE * 11 |
ソースコード
#include <bits/stdc++.h> using ll = long long; using llu = long long unsigned; using namespace std; #define MOD 998244353 int main() { int N, M; cin >> N >> M; vector<int> A(N); vector<int> B(M); for (auto &x : A) { cin >> x; } for (auto &x : B) { cin >> x; } vector<pair<double, int>> score; for (int i=0; i<N; i++) { for (int j=0; j<M; j++) { score.push_back(make_pair((-1.0*A[i])/B[j], i+1)); } } sort(score.begin(), score.end()); int count = 0; for (auto itr=score.begin(); ; itr++) { cout << itr->second << endl; count++; if (count >= M) { break; } } return 0; }