結果
問題 |
No.313 π
|
ユーザー |
![]() |
提出日時 | 2017-03-26 18:26:56 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 6 ms / 5,000 ms |
コード長 | 1,133 bytes |
コンパイル時間 | 678 ms |
コンパイル使用メモリ | 84,348 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-06 06:31:44 |
合計ジャッジ時間 | 1,645 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 32 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:49:23: warning: ‘c’ may be used uninitialized in this function [-Wmaybe-uninitialized] 49 | cout<<b<<" "<<c<<endl; | ^ main.cpp:49:18: warning: ‘b’ may be used uninitialized in this function [-Wmaybe-uninitialized] 49 | cout<<b<<" "<<c<<endl; | ^~~
ソースコード
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<cmath> #include<cstring> #include<queue> #include<stack> #include<cstdio> #include<sstream> #include<iomanip> #include<assert.h> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) #define pb push_back #define all(in) in.begin(),in.end() #define shosu(x) fixed<<setprecision(x) using namespace std; //kaewasuretyuui typedef long long ll; typedef pair<int,int> pii; typedef vector<ll> vi; typedef vector<vi> vvi; typedef vector<pii> vp; typedef vector<vp> vvp; typedef vector<string> vs; typedef vector<double> vd; typedef vector<vd> vvd; typedef pair<int,pii> pip; typedef vector<pip>vip; const double PI=acos(-1); const double EPS=1e-7; const int inf=1e8; const ll INF=1e16; int dx[4]={0,1,0,-1}; int dy[4]={1,0,-1,0}; int main(){ int a[10]={20104,20063,19892,20011,19874,20199,19898,20163,19956,19841}; string s; cin>>s; int co[10]={0}; rep(i,s.size())if(i-1)co[s[i]-'0']++; int b,c; rep(i,10)if(a[i]+1==co[i])b=i; else if(a[i]-1==co[i])c=i; cout<<b<<" "<<c<<endl; }