結果
問題 | No.542 1円玉と5円玉 |
ユーザー | yicode |
提出日時 | 2023-05-22 14:36:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 430 bytes |
コンパイル時間 | 1,848 ms |
コンパイル使用メモリ | 176,112 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-22 10:08:36 |
合計ジャッジ時間 | 2,486 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:17:20: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions] 17 | for (const auto& [key, value] : ans) { | ^
ソースコード
#include <bits/stdc++.h>using namespace std;using Graph = vector<vector<int>>;using ll = long long;int dx[4] = {1, 0, -1, 0};int dy[4] = {0, 1, 0, -1};int main() {int A,B; cin >> A >> B;map<int,int> ans;for(int i = 0; i <= A; i++) {for(int j = 0; j <= B; j++) {int x = (i * 1) + (j * 5);ans[x] = 1;}}ans.erase(0);for (const auto& [key, value] : ans) {cout << key << endl;}}