Submission #371300
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
#define all(c) (c).begin(),(c).end()
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define REP(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(it,c) for(iter(c) it=(c).begin();it!=(c).end();it++)
#define pb(a) push_back(a)
#define pr(a) cout<<(a)<<endl
#define PR(a,b) cout<<(a)<<" "<<(b)<<endl
#define R cin>>
#define F first
#define S second
#define ll long long
bool check(int n,int m,int x,int y){return x>=0&&x<n&&y>=0&&y<m;}
const ll MAX=1000000007,MAXL=1LL<<60,dx[4]={-1,0,1,0},dy[4]={0,1,0,-1};
typedef pair<int,int> P;
int main() {
int n;
R n;
vector<int> v[n+1];
rep(i,n) {
int x,y;
cin >> x >> y;
v[x].pb(y);
v[y].pb(x);
}
int X=MAX,Y=0;
REP(i,1,n+1) {
X=min(X,(int)v[i].size());
Y=max(Y,(int)v[i].size());
}
PR(X,Y);
return 0;
}
Submission Info
Submission Time |
|
Task |
C - 最小カットと最大カット |
User |
kzyKT |
Language |
C++ (GCC 4.9.2) |
Score |
0 |
Code Size |
943 Byte |
Status |
WA |
Exec Time |
158 ms |
Memory |
6552 KB |
Judge Result
Set Name |
All |
Score / Max Score |
0 / 100 |
Status |
|
Set Name |
Test Cases |
All |
scrambled_00.txt, scrambled_01.txt, scrambled_02.txt, scrambled_03.txt, scrambled_04.txt, scrambled_05.txt, scrambled_06.txt, scrambled_07.txt, scrambled_08.txt, scrambled_09.txt, scrambled_10.txt, scrambled_11.txt, scrambled_12.txt, scrambled_13.txt, scrambled_14.txt, scrambled_15.txt, scrambled_16.txt, scrambled_17.txt, scrambled_18.txt, scrambled_19.txt, scrambled_20.txt, scrambled_21.txt, scrambled_22.txt, scrambled_23.txt, scrambled_24.txt, scrambled_25.txt, scrambled_26.txt, scrambled_27.txt, scrambled_28.txt |
Case Name |
Status |
Exec Time |
Memory |
scrambled_00.txt |
AC |
25 ms |
804 KB |
scrambled_01.txt |
AC |
24 ms |
924 KB |
scrambled_02.txt |
WA |
23 ms |
924 KB |
scrambled_03.txt |
WA |
157 ms |
6180 KB |
scrambled_04.txt |
WA |
158 ms |
6184 KB |
scrambled_05.txt |
WA |
105 ms |
4132 KB |
scrambled_06.txt |
WA |
74 ms |
2840 KB |
scrambled_07.txt |
WA |
152 ms |
5748 KB |
scrambled_08.txt |
WA |
64 ms |
2464 KB |
scrambled_09.txt |
WA |
75 ms |
2980 KB |
scrambled_10.txt |
AC |
149 ms |
6552 KB |
scrambled_11.txt |
AC |
71 ms |
2972 KB |
scrambled_12.txt |
AC |
124 ms |
5408 KB |
scrambled_13.txt |
AC |
117 ms |
5144 KB |
scrambled_14.txt |
WA |
158 ms |
6180 KB |
scrambled_15.txt |
WA |
119 ms |
4640 KB |
scrambled_16.txt |
WA |
72 ms |
2724 KB |
scrambled_17.txt |
WA |
74 ms |
2780 KB |
scrambled_18.txt |
WA |
156 ms |
6308 KB |
scrambled_19.txt |
WA |
35 ms |
1192 KB |
scrambled_20.txt |
WA |
105 ms |
4264 KB |
scrambled_21.txt |
WA |
72 ms |
2844 KB |
scrambled_22.txt |
WA |
116 ms |
4568 KB |
scrambled_23.txt |
WA |
79 ms |
3108 KB |
scrambled_24.txt |
WA |
75 ms |
2844 KB |
scrambled_25.txt |
WA |
95 ms |
3552 KB |
scrambled_26.txt |
WA |
76 ms |
2980 KB |
scrambled_27.txt |
WA |
105 ms |
4136 KB |
scrambled_28.txt |
WA |
104 ms |
3824 KB |