結果
問題 |
No.447 ゆきこーだーの雨と雪 (2)
|
ユーザー |
|
提出日時 | 2019-08-21 18:50:28 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
CE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 1,465 bytes |
コンパイル時間 | 696 ms |
コンパイル使用メモリ | 97,300 KB |
最終ジャッジ日時 | 2025-01-28 22:47:44 |
合計ジャッジ時間 | 1,620 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp:15:13: error: ‘uint32_t’ does not name a type 15 | using u32 = uint32_t; | ^~~~~~~~ main.cpp:12:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’? 11 | #include <cmath> +++ |+#include <cstdint> 12 | main.cpp: In function ‘int main()’: main.cpp:24:29: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 24 | for (auto &&i : v) scanf("%d", &i); | ~~~~~^~~~~~~~~~
ソースコード
#include <limits> #include <iostream> #include <algorithm> #include <iomanip> #include <map> #include <set> #include <queue> #include <stack> #include <numeric> #include <bitset> #include <cmath> static const int MOD = 1000000007; using ll = long long; using u32 = uint32_t; using namespace std; template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208; int main() { int n; cin >> n; vector<int> v(n); for (auto &&i : v) scanf("%d", &i); vector<int> solved(n); map<string, int> m; int cur = 0; map<int, string> minv; vector<vector<int>> table(0); int t; cin >> t; while(t--){ string s; char c; cin >> s >> c; if(!m.count(s)) { minv[cur] = s; m[s] = cur++; table.emplace_back(n+2); table[m[s]][n] = cur-1; } int id = c - 'A'; table[m[s]][id] = 50*v[id]+500*v[id]/(10+2*solved[id]); table[m[s]][n+1] += (50*v[id]+500*v[id]/(10+2*solved[id]))*10000; table[m[s]][n+1] = table[m[s]][n+1]/10000*10000 + t; solved[id]++; } sort(table.begin(),table.end(), [](vector<int> &a, vector<int> &b){ return a.back() > b.back(); }); for (int i = 0; i < cur; ++i) { cout << i+1 << " " << minv[table[i][n]] << " "; for (int j = 0; j < n; ++j) { cout << table[i][j] << " "; } cout << table[i][n+1]/10000 << "\n"; } return 0; }