結果
問題 |
No.3041 非対称じゃんけん
|
ユーザー |
|
提出日時 | 2025-02-28 22:15:09 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 483 bytes |
コンパイル時間 | 4,584 ms |
コンパイル使用メモリ | 251,792 KB |
実行使用メモリ | 8,236 KB |
最終ジャッジ日時 | 2025-02-28 22:15:33 |
合計ジャッジ時間 | 23,389 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 TLE * 5 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:17:26: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘std::size_t’ {aka ‘long unsigned int’} [-Wformat=] 17 | printf("%d\n", ans.count()); | ~^ ~~~~~~~~~~~ | | | | int std::size_t {aka long unsigned int} | %ld main.cpp:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf(" %d %d", &N, &F); | ~~~~~^~~~~~~~~~~~~~~~~~ main.cpp:10:31: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | for (int& a : A) scanf(" %d", &a); | ~~~~~^~~~~~~~~~~ main.cpp:11:31: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | for (int& b : B) scanf(" %d", &b); | ~~~~~^~~~~~~~~~~ main.cpp:12:31: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 12 | for (int& c : C) scanf(" %d", &c); | ~~~~~^~~~~~~~~~~
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; int main () { int N, F; scanf(" %d %d", &N, &F); std::vector<int> A(N), B(N), C(N); for (int& a : A) scanf(" %d", &a); for (int& b : B) scanf(" %d", &b); for (int& c : C) scanf(" %d", &c); bitset<900001> ans; ans[0] = 1; for (int i = 0; i < N; i ++) { ans = (ans << A[i]) | (ans << B[i]) | (ans << C[i]); printf("%d\n", ans.count()); } cout << flush; }