| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 20723 | 王兮 | 配方 | C++ | Wrong Answer | 0 | 0 MS | 256 KB | 470 | 2021-06-19 20:15:36 |
#include<bits/stdc++.h> using namespace std; int n,k; int a[1010][20]; int a1[20],a2[20],a0[20]; int s1,s2,s0; int main(){ cin>>n>>k; for(int i=1;i<=n;i++){ for(int j=1;j<=k;j++){ cin>>a[i][j]; if(a[i][j]==1)a1[++s1]=j; if(a[i][j]==2)a2[++s2]=j; if(a[i][j]==0)a0[++s0]=j; } } for(int x=1;x<=20;x++){ for(int y=1;y<=20;y++){ if(a1[x]!=0&&a2[x]!=0){ if(a1[x]==a2[y]){ cout<<-1; return 0; } } } } }