对决(未完成)
This commit is contained in:
parent
0dae360b68
commit
ee1594623a
|
@ -0,0 +1,3 @@
|
|||
# 标题
|
||||
|
||||
* 内容
|
|
@ -0,0 +1 @@
|
|||
#
|
Binary file not shown.
|
@ -0,0 +1,36 @@
|
|||
#include <iostream>
|
||||
#include <cstdio>
|
||||
using namespace std;
|
||||
int main()
|
||||
{
|
||||
int ge,sai,pan[101]={0};
|
||||
bool a[101][101]={0};
|
||||
scanf("%d%d",&ge,&sai);
|
||||
for(int i=1;i<=sai;i++){
|
||||
int yin,shu;
|
||||
scanf("%d%d",&yin,&shu);
|
||||
a[shu][yin]=1;
|
||||
}
|
||||
for(int i=1;i<=ge;i++){
|
||||
int now=1;
|
||||
for(int j=1;j<=ge;j++){
|
||||
if(a[i][j]==1){
|
||||
now++;
|
||||
}
|
||||
}
|
||||
if(pan[now]==0){
|
||||
pan[now]=1;
|
||||
}else{
|
||||
pan[now]=-1;
|
||||
cout<<i<<" "<<now<<endl;
|
||||
}
|
||||
}
|
||||
int ans=0;
|
||||
for(int i=1;i<=ge;i++)
|
||||
{
|
||||
if(pan[i]==1){
|
||||
ans++;
|
||||
}
|
||||
}
|
||||
printf("%d",ans);
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,6 @@
|
|||
5 5
|
||||
4 3
|
||||
4 2
|
||||
3 2
|
||||
1 2
|
||||
2 5
|
|
@ -0,0 +1,20 @@
|
|||
## z:\Chao\src\2717_duijue\test\in.txt
|
||||
2020/05/03 ÖÜÈÕ 19:33:37.73
|
||||
4 1
|
||||
5 2
|
||||
1
|
||||
-----------------------------------------------
|
||||
Process exited after 180 ms with return value 0
|
||||
|
||||
## z:\Chao\src\2717_duijue\test\in2.txt
|
||||
2020/05/03 ÖÜÈÕ 19:33:37.73
|
||||
|
||||
-----------------------------------------------
|
||||
Process exited after 70 ms with return value -1073741819
|
||||
|
||||
## z:\Chao\src\2717_duijue\test\in3.txt
|
||||
2020/05/03 ÖÜÈÕ 19:33:37.73
|
||||
|
||||
-----------------------------------------------
|
||||
Process exited after 70 ms with return value -1073741819
|
||||
|
Loading…
Reference in New Issue