結果
| 問題 | No.2784 繰り上がりなし十進和 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-14 23:27:41 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,157 bytes |
| 記録 | |
| コンパイル時間 | 2,406 ms |
| コンパイル使用メモリ | 208,068 KB |
| 最終ジャッジ日時 | 2025-02-21 22:27:11 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 WA * 18 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
void solve() {
vector<vector<ll>> a;
{
set<string> st;
rep(i, 6) {
string s;
cin >> s;
st.insert(s);
}
vector<string> vec(st.begin(), st.end());
set<string> st2;
rep(j, 6) {
string s = ""s;
rep(i, vec.size()) { s.push_back(vec[i][j]); }
st2.insert(s);
}
vector<string> vec2(st2.begin(), st2.end());
a.resize(vec.size());
rep(i, vec.size()) {
rep(j, vec2.size()) { a[i].push_back(vec2[j][i] - '0'); }
}
}
ll ans = 1;
rep(j, a[0].size()) {
bool ok = false, ff = false, ef = false;
rep(i, a.size()) {
ok |= a[i][j] != 5 && a[i][j] % 2 == 1;
ff |= a[i][j] == 5;
ef |= a[i][j] != 0 && a[i][j] % 2 == 0;
}
if (ok || (ff && ef)) {
ans *= 10;
} else if (ff) {
ans *= 2;
} else if (ef) {
ans *= 5;
}
}
cout << ans << '\n';
}
int main() {
std::cin.tie(nullptr);
std::ios_base::sync_with_stdio(false);
int T = 1;
for (int t = 0; t < T; t++) {
solve();
}
return 0;
}