好像没@上。
@[chen_zhe](/user/8457)
by xiaolilsq @ 2020-05-17 22:30:22
好像这里写错了
```cpp
if(ta!=ta){
quitf(_wa,"Your answer is wrong, read %d, expect %d.",tb,ta);
return 0;
}
```
是这个吧:
```cpp
if(tb!=ta){
quitf(_wa,"Your answer is wrong, read %d, expect %d.",tb,ta);
return 0;
}
```
by 小恐 @ 2020-05-17 22:31:49
哦!抱歉!
by xiaolilsq @ 2020-05-17 22:32:15
```cpp
#include "testlib.h"
using namespace std;
int a[100][100];
int main(int argc,char** argv){
registerTestlibCmd(argc,argv);
int n=inf.readInt(),S=inf.readInt();
int ta=ans.readInt(),tb=ouf.readInt();
if(ta!=tb){
quitf(_wa,"Your answer is wrong, read %d, expect %d.",tb,ta);
return 0;
}
if(ta>100)ta=100;
for(int i=0;i<ta;++i){
int sm=0;
for(int j=0;j<n;++j){
a[i][j]=ouf.readInt();
sm+=a[i][j];
}
if(sm!=S){
quitf(_wa,"Your plan is wrong.");
return 0;
}
}
for(int i=0;i<ta;++i){
for(int j=i+1;j<ta;++j){
int k;
for(k=0;k<n;++k){
if(a[i][k]!=a[j][k]){
break;
}
}
if(k==n){
quitf(_wa,"Your plan isn't unique.");
return 0;
}
}
}
quitf(_ok,"Your answer is correct.");
return 0;
}
```
by xiaolilsq @ 2020-05-17 22:32:38
@[xiaolilsq](/user/230249) spj 有锅,最后 4 个点 uke。
by 一扶苏一 @ 2020-05-25 12:19:53
@[一扶苏一](/user/65363)
抱歉!`long long`写成`int`了!
```cpp
#include "testlib.h"
using namespace std;
int a[100][100];
int main(int argc,char** argv){
registerTestlibCmd(argc,argv);
int n=inf.readInt(),S=inf.readInt();
long long ta=ans.readLong(),tb=ouf.readLong();
if(ta!=tb){
quitf(_wa,"Your answer is wrong, read %I64d, expect %I64d.",tb,ta);
return 0;
}
if(ta>100)ta=100;
for(int i=0;i<ta;++i){
int sm=0;
for(int j=0;j<n;++j){
a[i][j]=ouf.readInt();
sm+=a[i][j];
}
if(sm!=S){
quitf(_wa,"Your plan is wrong.");
return 0;
}
}
for(int i=0;i<ta;++i){
for(int j=i+1;j<ta;++j){
int k;
for(k=0;k<n;++k){
if(a[i][k]!=a[j][k]){
break;
}
}
if(k==n){
quitf(_wa,"Your plan isn't unique.");
return 0;
}
}
}
quitf(_ok,"Your answer is correct.");
return 0;
}
```
by xiaolilsq @ 2020-05-25 12:49:13
我贡献一个吧
[https://littlefrog.lanzous.com/ibzglgj](https://littlefrog.lanzous.com/ibzglgj "我自己做了一个")
密码:kkknb
@[一扶苏一](/user/65363)
by littlefrog @ 2020-05-25 12:57:07
@[xiaolilsq](/user/230249) added,感谢您的贡献!
by 一扶苏一 @ 2020-05-25 12:59:27
@[littlefrog](/user/175567) 已经有了,感谢。
by 一扶苏一 @ 2020-05-25 12:59:37
%%%
by O3O_O3O_O3O @ 2022-05-11 15:29:14