Submission #00032
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | /*Function Template*/ #include<bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll,ll> pint; const int MAX = 510000; const int MOD = 1000000007; #define rep(i, n) for(ll i = 0; i < (n); i++) #define Rep(i, n) for(ll i = 1; i < (n); i++) #define ALL(a) (a).begin(),(a).end() #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define PI 3.14159265358979323846 ll fac[MAX], finv[MAX], inv[MAX]; template < class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true ; } return false ; } template < class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true ; } return false ; } // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (ll i = 2; i < MAX; i++){ fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } ll Len(ll n) { ll s=0; while (n!=0) s++, n/=10; return s; } ll Sint(ll n) { ll m=0,s=0,a=n; while (a!=0) s++, a/=10; for (ll i=s-1;i>=0;i--) m+=n/((ll) pow (10,i))-(n/((ll) pow (10,i+1)))*10; return m; } ll Svec(vector<ll> v){ ll n=0; for (ll i=0;i<v.size();i++) n+=v[i]; return n; } ll GCD(ll a,ll b) { return b ? GCD(b,a%b) : a; } ll LCM(ll a,ll b){ return a/GCD(a,b)*b; } ll Factorial(ll n){ ll m=1; while (n>=1) m*=n,n--; return m; } void runlength(string s,vector<pair< char ,ll>> &p){ ll x=1; if (s.size()==1){ p.push_back(pair< char ,ll>(s[0],1)); } for (ll i=0;i<s.size()-1;i++){ if (s[i]==s[i+1]){ x++; if (i==s.size()-2){ p.push_back(pair< char ,ll>(s[i],x)); } } else { p.push_back(pair< char ,ll>(s[i],x)); x=1; if (i==s.size()-2){ p.push_back(pair< char ,ll>(s[s.size()-1],x)); } } } } ll COM(ll n,ll k){ if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } ll modpow(ll a, ll n, ll mod) { ll res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } string Toupper(string s){ string ans= "" ; rep(i,s.size()){ if ( 'a' <=s[i] && s[i]<= 'z' ) ans+=( char )s[i]-32; else ans+=s[i]; } return ans; } string Tolower(string s){ string ans= "" ; rep(i,s.size()){ if ( 'A' <=s[i] && s[i]<= 'Z' ) ans+=( char )s[i]+32; else ans+=s[i]; } return ans; } const int MAX_N=100010; vector< bool > sieve_of_eratosthenes(){ vector< bool > isPrime(MAX_N+1, true ); for ( int i=2;i<=MAX_N;i++){ if (isPrime[i]){ for ( int j=2*i;j<=MAX_N;j+=i){ isPrime[j]= false ; } } } return isPrime; } vector<pint> prime_factorize(ll n){ vector<pint> ans; for (ll p=2;p<= sqrt (n);p++){ if (n%p!=0) continue ; ll cnt=0; while (n%p==0){ n/=p; cnt++; } ans.push_back(make_pair(p,cnt)); } if (n!=1) ans.push_back(make_pair(n,1)); return ans; } /*bool cmp(pint a, pint b) { return a.second < b.second; }*/ /*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/ int main() { IOS; ll a,b,c; cin>>a>>b>>c; cout<<min(a,b*c)<<endl; } |
ステータス
項目 | データ |
---|---|
問題 | 0001 - Eating NAMEKUZI |
ユーザー名 | nope124 |
投稿日時 | 2020-03-02 21:02:10 |
言語 | C++11 |
状態 | Accepted |
得点 | 100 |
ソースコード長 | 3391 Byte |
最大実行時間 | 31 ms |
最大メモリ使用量 | 664 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 100 / 100 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in01.txt | AC | 21 ms | 476 KB |
1
|
in02.txt | AC | 19 ms | 432 KB |
1
|
in03.txt | AC | 21 ms | 388 KB |
1
|
in04.txt | AC | 20 ms | 476 KB |
1
|
in05.txt | AC | 19 ms | 428 KB |
1
|
in06.txt | AC | 20 ms | 512 KB |
1
|
in07.txt | AC | 23 ms | 596 KB |
1
|
in08.txt | AC | 15 ms | 552 KB |
1
|
in09.txt | AC | 19 ms | 504 KB |
1
|
in10.txt | AC | 21 ms | 588 KB |
1
|
in11.txt | AC | 23 ms | 544 KB |
1
|
in12.txt | AC | 31 ms | 496 KB |
1
|
in13.txt | AC | 25 ms | 584 KB |
1
|
in14.txt | AC | 16 ms | 664 KB |
1
|
in15.txt | AC | 18 ms | 616 KB |
1
|
in16.txt | AC | 23 ms | 564 KB |
1
|
sample01.txt | AC | 17 ms | 648 KB |
1
|
sample02.txt | AC | 22 ms | 596 KB |
1
|