結果
| 問題 |
No.313 π
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-12-06 02:40:41 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 7 ms / 5,000 ms |
| コード長 | 1,082 bytes |
| コンパイル時間 | 662 ms |
| コンパイル使用メモリ | 87,216 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-14 15:03:46 |
| 合計ジャッジ時間 | 1,907 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 32 |
ソースコード
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <sstream>
#include <string>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
#define var auto
#define mod 1000000007
#define inf 2147483647
#define nil -1
typedef long long ll;
using namespace std;
// end of template
int main() {
cin.tie(0);
// source code
string s;
cin >> s;
int bin_true = 682;
int sum_true = 17;
int bin = 0;
int sum = 0;
rep(i, 200002){
if (i != 1) {
bin ^= 1 << (s[i] - '0'), sum += (s[i] - '0'), sum %= 100;
}
}
sum -= sum_true, bin ^= bin_true;
vector<int> ans;
rep(i, 10){
if (bin & 1) {
ans.push_back(i);
}
bin >>= 1;
}
if (sum > 0) {
cout << ans[1] << " " << ans[0] << endl;
}
else {
cout << ans[0] << " " << ans[1] << endl;
}
return 0;
}