結果
| 問題 |
No.177 制作進行の宮森あおいです!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-15 08:40:56 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 661 bytes |
| コンパイル時間 | 901 ms |
| コンパイル使用メモリ | 95,956 KB |
| 最終ジャッジ日時 | 2024-11-15 02:19:11 |
| 合計ジャッジ時間 | 1,451 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:6:5: error: 'cin' was not declared in this scope
6 | cin >> W >> N;
| ^~~
main.cpp:2:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
1 | #include<atcoder/all>
+++ |+#include <iostream>
2 | using namespace std;
main.cpp:25:5: error: 'cout' was not declared in this scope
25 | cout << (g.flow(s, t) >= W ? "SHIROBAKO" : "BANSAKUTSUKITA") << '\n';
| ^~~~
main.cpp:25:5: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
ソースコード
#include<atcoder/all>
using namespace std;
int main(){
int W, N, M, v, v2, s = 100, t = 101;
cin >> W >> N;
atcoder::mf_graph<int> g(102);
for(int i = 0; i < N; i++){
cin >> v;
g.add_edge(s, i, v);
}
cin >> M;
for(int i = 0; i < M; i++){
cin >> v;
g.add_edge(N + i, t, v);
}
for(int i = 0; i < M; i++){
cin >> v2;
vector<int> S(v2);
for(auto &&v:S)cin >> v, v--;
for(int j = 0; j < N; j++){
if(!binary_search(S.begin(), S.end(), j))g.add_edge(j, N + i, W);
}
}
cout << (g.flow(s, t) >= W ? "SHIROBAKO" : "BANSAKUTSUKITA") << '\n';
}