結果
| 問題 | No.1729 ~サンプルはちゃんと見て!~ 16進数と8進数(1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-11-05 21:38:14 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 2,502 bytes |
| 記録 | |
| コンパイル時間 | 13,343 ms |
| コンパイル使用メモリ | 284,924 KB |
| 最終ジャッジ日時 | 2025-01-25 12:03:11 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 15 |
ソースコード
#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <algorithm>
#include <set>
#include <vector>
#include <set>
#include <queue>
#include <tuple>
#include <map>
#define se second
#define fi first
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define rep(i,n) for(long long i = 0; i < (int)n; i++)
#define FOR(i, m, n) for(long long i = (m);i < (n); ++i)
#define RFOR(i, n, m) for(long long i = (m-1);i >= (n); --i)
#define ALL(obj) (obj).begin(),(obj).end()
#define SPEED cin.tie(0);ios::sync_with_stdio(false);
template<class T> using V = vector<T>;
template<class T, class U> using P = pair<T, U>;
template<class T> using PQ = priority_queue<T>;
template<class T> using PQR = priority_queue<T,vector<T>,greater<T>>;
void print(V<ll> ar) {
for(auto x: ar)cout << x << " " ;
cout << endl;
}
ll gcd(ll a, ll b) {
if (a<b)return gcd(b,a);
if (b==0)return a;
return gcd(b, a%b);
}
ll mpow(ll x, ll n, ll p) {
ll r = 1;
while (n>0) {
if (n%2) {
r*=x;
r%=p;
}
x *= x;
x %= p;
n/=2;
}
return r;
}
const ll mod = 998244353;
V<P<ll,int>> facts(ll n) {
V<P<ll,int>> res;
if (n==1)return res;
for(int x = 2; x*x<=n; x++) {
if (n%x==0) {
int p = 0;
while (n%x==0) {
p+=1;
n/=x;
}
res.emplace_back(P<ll,int>(x, p));
}
}
if (n!=1) {
res.emplace_back(P<ll,int>(n, 1));
}
return res;
}
const int inf = 1000000000;
int main()
{
string n;cin >> n;
V<int> a(8,0);
rep(i, n.size()) {
if (n[i]=='A') {
a[1]+=1;
a[2]+=1;
}
else if(n[i]=='B') {
a[1]+=1;
a[3]+=1;
}
else if(n[i]=='C') {
a[1] += 1;
a[4]+=1;
}
else if(n[i]=='D') {
a[1]++;
a[5]++;
}
else if(n[i]=='E') {
a[1]++;
a[6]++;
}
else {
a[1]++;
a[7]++;
}
}
int m = *max_element(a.begin(),a.end());
//cout << m << endl;
V<int> ans;
rep(i, 8) {
if (a[i]==m) {
ans.emplace_back(i);
}
}
rep(i, ans.size()-1) {
cout << ans[i] << " ";
}
cout << ans[ans.size()-1] << endl;
}