32 lines
672 B
C++
32 lines
672 B
C++
#include<iostream>
|
|
using namespace std;
|
|
int main(){
|
|
int n,m;
|
|
cin>>n>>m;
|
|
bool won[101][101]={0},lost[101][101]={0};//ÎÒÓ®ÁËË£¬ÎÒÊä¸øË
|
|
for(int i=1;i<=m;i++){
|
|
int yin,shu;
|
|
cin>>yin>>shu;
|
|
|
|
won[yin][shu]=1;
|
|
for(int j=1;j<=n;j++){
|
|
if(lost[yin][j]==1){
|
|
won[j][shu]=1;
|
|
}
|
|
}
|
|
|
|
lost[shu][yin]=1;
|
|
for(int j=1;j<=n;j++){
|
|
if(won[shu][j]==1){
|
|
lost[j][yin]=1;
|
|
}
|
|
}
|
|
}
|
|
|
|
int sheng[101]={0},bai[101]={0};
|
|
for(int i=1;i<=n;i++){
|
|
for(int j=1;j<=n;j++){
|
|
|
|
}
|
|
}
|
|
} |