結果
| 問題 |
No.3235 巡回減算
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-08-15 22:13:05 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 668 bytes |
| コンパイル時間 | 1,770 ms |
| コンパイル使用メモリ | 197,784 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-08-15 22:13:14 |
| 合計ジャッジ時間 | 7,354 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
vector<string> A(8);
for(auto &&str : A) cin >> str;
string str(8, '0');
constexpr int mx = 2097152;
for(int S = 0; S < mx; S++){
fill(str.begin(), str.end(), '0');
for(int j = 1, sh, tmp = S; j < 8; j++, tmp /= 8){
sh = tmp % 8;
for(int k = 0; k < 8; k++){
str[k] = min(str[k] + (int)(A[j][(k - sh) & 7] - '0'), (int)'9');
}
}
if(str == A[0]){
cout << "Yes\n";
return 0;
}
}
cout << "No\n";
}