結果
| 問題 |
No.3041 非対称じゃんけん
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-02-28 21:59:02 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 862 bytes |
| コンパイル時間 | 1,956 ms |
| コンパイル使用メモリ | 199,528 KB |
| 実行使用メモリ | 8,232 KB |
| 最終ジャッジ日時 | 2025-02-28 21:59:10 |
| 合計ジャッジ時間 | 7,172 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 25 WA * 5 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template<class T> istream& operator >> (istream& is, vector<T>& vec) {
for(T& x : vec) is >> x;
return is;
}
template<class T> ostream& operator << (ostream& os, const vector<T>& vec) {
if(vec.empty()) return os;
os << vec[0];
for(auto it = vec.begin(); ++it != vec.end(); ) os << ' ' << *it;
return os;
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n, f;
cin >> n >> f;
vector<int> a(n), b(n), c(n);
cin >> a >> b >> c;
bitset<300001> B;
B[0] = 1;
array<int, 3> ary;
for(int i = 0; i < n; i++){
ary = {a[i], b[i], c[i]};
sort(ary.begin(), ary.end());
int c1 = ary[1] - ary[0];
int c2 = ary[2] - ary[0];
B |= (B << c1) | (B << c2);
cout << B.count() << '\n';
}
}