結果

問題 No.2414 2 KA 3 KA
ユーザー yurina256yurina256
提出日時 2023-08-12 13:35:24
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 6,650 bytes
コンパイル時間 3,952 ms
コンパイル使用メモリ 236,716 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-15 00:56:14
合計ジャッジ時間 5,133 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,384 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 1 ms
4,380 KB
testcase_15 AC 1 ms
4,376 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 1 ms
4,380 KB
testcase_19 AC 2 ms
4,380 KB
testcase_20 AC 2 ms
4,384 KB
testcase_21 AC 1 ms
4,380 KB
testcase_22 AC 2 ms
4,380 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 AC 1 ms
4,380 KB
testcase_25 AC 2 ms
4,384 KB
testcase_26 AC 2 ms
4,380 KB
testcase_27 AC 2 ms
4,376 KB
testcase_28 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#include <atcoder/all>
using namespace std; 
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define length size()
#define int long long
#define ll long long
constexpr ll inf = 1001001001001001001ll;
constexpr ll mod = /* 1000000007*/ 998244353;
constexpr double pi = 3.141592653589793;
//小数出力
//cout << std::setprecision(12);
//imos
void to_ruiseki(vector<int> &vec){
    for(int i=1;i<(int)vec.size();i++){
        vec[i] += vec[i-1];
    }
}
void to_2druiseki(vector<vector<int>> &vec){
    rep(i,vec.size()){
        rep(j,vec[0].size()){
            int s = 0;
            if(i!=0) s += vec[i-1][j];
            if(j!=0) s += vec[i][j-1];
            if(i!=0 && j!=0) s -= vec[i-1][j-1];
            s += vec[i][j];
            vec[i][j] = s;
        }
    }
}
//modpow(a,n,mod)
int modpow(int a, int n, int mod) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}
//素因数分解
vector<pair<int,int>> p_fact(int N) {
    vector<pair<int,int>> res;
    for (int a = 2; a * a <= N; ++a) {
        if (N % a != 0) continue;
        int ex = 0; // 指数

        // 割れる限り割り続ける
        while (N % a == 0) {
            ++ex;
            N /= a;
        }

        // その結果を push
        res.push_back({a, ex});
    }

    // 最後に残った数について
    if (N != 1) res.push_back({N, 1});
    return res;
}
//ctoi
int ctoi(const char c){
  switch(c){
    case '0': return 0;
    case '1': return 1;
    case '2': return 2;
    case '3': return 3;
    case '4': return 4;
    case '5': return 5;
    case '6': return 6;
    case '7': return 7;
    case '8': return 8;
    case '9': return 9;
    default :  throw runtime_error("hoge");
  }
}
//max
template< typename T1, typename T2 >
inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }
//min
template< typename T1, typename T2 >
inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }
//print
void print() { cout << '\n'; }
template<typename T>
void print(const T &t) { cout << t << '\n'; }
template<typename Head, typename... Tail>
void print(const Head &head, const Tail &... tail) {
    cout << head << ' ';
    print(tail...);
}
//join
template<typename T> string join(vector<T> &vec ,const string &sp){
    int si = vec.length;
    if(si==0){
        return "";
    }else{
        stringstream ss;
        rep(i,si-1){
            ss << vec[i] << sp;
        }
        ss << vec[si - 1];
        return ss.str();
    }
}
//木の直径
int tree_diameter(vector<vector<int>> &vec){
    //0-indexed
    queue<pair<int,int>> que;
    vector<bool> is_searched(vec.size(),false);
    que.push(make_pair(0,0));
    int max_d = 0;
    int max_e = 0;
    while(!que.empty()){
        int e = que.front().first;
        int distance = que.front().second;
        is_searched[e] = true;
        if(max_d<distance){
            max_d = distance;
            max_e = e;
        }
        que.pop();
        rep(i,vec[e].size()){
            if(!is_searched[vec[e][i]]){
                que.push( make_pair( vec[e][i], distance + 1 ) );
            }
        }
    }
    fill(is_searched.begin(),is_searched.end(),false);
    que.push(make_pair(max_e,0));
    max_d = 0;
    max_e = 0;
    
    while(!que.empty()){
        int e = que.front().first;
        int distance = que.front().second;
        is_searched[e] = true;
        if(max_d<distance){
            max_d = distance;
            max_e = e;
        }
        que.pop();
        rep(i,vec[e].size()){
            if(!is_searched[vec[e][i]]){
                que.push( make_pair( vec[e][i], distance + 1 ) );
            }
        }
    }
    return max_d;
}
//uf 根:root(x) 判定:issame(x,y) 結合:unite(x,y) 大きさ:size(x)
int getlongpath(vector<vector<int>> &vec,int st){
    queue<pair<int,int>> que;
    vector<bool> is_searched(vec.size(),false);
    is_searched[st] = true;
    que.push(make_pair(st,0));
    int max_d = 0;
    int max_e = 0;
    while(!que.empty()){
        int e = que.front().first;
        int distance = que.front().second;
        if(max_d<distance){
            max_d = distance;
            max_e = e;
        }
        que.pop();
        rep(i,vec[e].size()){
            if(!is_searched[vec[e][i]]){
                que.push( make_pair( vec[e][i], distance + 1 ) );
                is_searched[vec[e][i]] = true;
            }
        }
    }
    fill(is_searched.begin(),is_searched.end(),false);
    que.push(make_pair(max_e,0));
    return max_d;
}
struct UnionFind {
    vector<int> par, rank, siz;

    // 構造体の初期化
    UnionFind(int n) : par(n,-1), rank(n,0), siz(n,1) { }

    // 根を求める
    int root(int x) {
        if (par[x]==-1) return x; // x が根の場合は x を返す
        else return par[x] = root(par[x]); // 経路圧縮
    }

    // x と y が同じグループに属するか (= 根が一致するか)
    bool issame(int x, int y) {
        return root(x)==root(y);
    }

    // x を含むグループと y を含むグループを併合する
    bool unite(int x, int y) {
        int rx = root(x), ry = root(y); // x 側と y 側の根を取得する
        if (rx==ry) return false; // すでに同じグループのときは何もしない
        // union by rank
        if (rank[rx]<rank[ry]) swap(rx, ry); // ry 側の rank が小さくなるようにする
        par[ry] = rx; // ry を rx の子とする
        if (rank[rx]==rank[ry]) rank[rx]++; // rx 側の rank を調整する
        siz[rx] += siz[ry]; // rx 側の siz を調整する
        return true;
    }

    // x を含む根付き木のサイズを求める
    int size(int x) {
        return siz[root(x)];
    }
};
vector<pair<long long, long long> > prime_factorize(long long N) {
    vector<pair<long long, long long> > res;
    for (long long a = 2; a * a <= N; ++a) {
        if (N % a != 0) continue;
        long long ex = 0; // 指数

        // 割れる限り割り続ける
        while (N % a == 0) {
            ++ex;
            N /= a;
        }

        // その結果を push
        res.push_back({a, ex});
    }

    // 最後に残った数について
    if (N != 1) res.push_back({N, 1});
    return res;
}
int e(){
  	return inf;
}
int op(int a,int b){
	return min(a,b);
}
int h,w,a;
void t_print(vector<int> vec){
	rep(i,h){
    	rep(j,w){
        	cout << vec[i*h+j] << " ";
        }
      cout << endl;
    }
  cout << endl;
}
signed main(void){
  int a,b,c;
  cin >> a >> b >> c;
  cout << ((a*b*c >= 2*(a*b+b*c+c*a))?3:2) << endl;
}
0