QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#104836 | #5825. 矩阵 | sichengzhou | 0 | 840ms | 83812kb | C++14 | 800b | 2023-05-12 03:16:50 | 2023-05-12 03:16:53 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N=3300,mod=998244353;
int T,n;
LL a[N][N],b[N][N],c[N][N];
void work()
{
scanf("%d",&n);
for(int i=1;i<=n;i++)
{
for(int j=1;j<=n;j++)
{
scanf("%lld",&a[i][j]);
}
}
for(int i=1;i<=n;i++)
{
for(int j=1;j<=n;j++)
{
scanf("%lld",&b[i][j]);
}
}
for(int i=1;i<=n;i++)
{
for(int j=1;j<=n;j++)
{
scanf("%lld",&c[i][j]);
}
}
for(int t=1;t<=n;t++)
{
int x=rand()%n+1,y=rand()%n+1;
LL val=0;
for(int k=1;k<=n;k++)
{
val+=a[x][k]*b[k][y]%mod;
val%=mod;
}
if(c[x][y]!=val)
{
printf("No\n");
return ;
}
}
printf("Yes\n");
}
int main()
{
srand(time(0));
scanf("%d",&T);
while(T--)
{
work();
}
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 5764kb
input:
77 5 310980524 649430325 929726167 322133176 196533101 452124191 763518207 462580246 389109943 258982238 980842752 382992674 892794173 572244127 863057091 124971774 306543135 142770389 191933270 159536107 109591708 788516987 986057559 843265788 373012497 68607783 73771527 80822244 141931517 25629982...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes No Yes Yes Yes Yes No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes No Yes Yes No Yes Yes Yes Yes Yes No Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No No Yes Yes Yes No No Yes Yes Yes Yes
result:
wrong answer expected NO, found YES [4th token]
Test #2:
score: 0
Wrong Answer
time: 2ms
memory: 5852kb
input:
20 19 300786426 55348523 438467798 718608329 639575511 877480154 131078518 50498458 505652400 70781693 60607235 327377105 962399950 299685377 189021169 768713056 159947767 323830788 939451729 663015053 702349816 47032062 144232075 8590829 314695773 653195451 79047310 190236549 193759597 40824001 648...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
result:
wrong answer expected NO, found YES [3rd token]
Test #3:
score: 0
Wrong Answer
time: 707ms
memory: 83532kb
input:
17 1596 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
result:
wrong answer expected NO, found YES [1st token]
Test #4:
score: 0
Wrong Answer
time: 539ms
memory: 70880kb
input:
67 1434 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
result:
wrong answer expected NO, found YES [2nd token]
Test #5:
score: 0
Wrong Answer
time: 749ms
memory: 74908kb
input:
56 1496 827382385 334050842 562523170 64248344 772202392 344227963 962535698 610424680 191764282 201712819 261741289 38707441 723490918 616784554 656880245 541289597 106479168 181789413 983195098 366707435 245960214 738618459 166000436 637820477 108811383 83646606 418099171 704739401 10052747 848798...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
result:
wrong answer expected NO, found YES [2nd token]
Test #6:
score: 0
Wrong Answer
time: 840ms
memory: 83812kb
input:
20 1603 91905310 952717462 954485887 678448563 186981847 978898327 338140536 142208894 826264776 31056661 228690801 739960038 636575118 693539178 552731649 447161207 735822147 549896101 448501798 249993628 232603979 651172711 525376001 686066708 334392371 31224732 830607244 501599631 12908074 490182...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
result:
wrong answer expected NO, found YES [2nd token]
Test #7:
score: 0
Wrong Answer
time: 725ms
memory: 75672kb
input:
83 1504 312926430 470364934 584087355 865456364 663314460 144864284 86040064 304739271 52110782 189905783 204867442 654669354 700416903 873419055 247798007 336659255 547886460 35701369 50399953 750825612 232240264 279725763 390903577 254078528 123437599 833862824 919919348 664000739 203075130 525566...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Y...
result:
wrong answer expected NO, found YES [5th token]
Test #8:
score: 0
Wrong Answer
time: 681ms
memory: 75076kb
input:
92 1491 422064757 810225812 58914901 70234338 273595204 258594523 880518679 942823445 991245948 834057054 985736324 626095263 195913075 708777902 158324260 624966332 989571760 895942048 76442464 377096766 794818118 240859092 475927849 113281577 787350276 276940304 971362517 217702894 867701250 98410...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Ye...
result:
wrong answer expected NO, found YES [1st token]
Test #9:
score: 0
Wrong Answer
time: 760ms
memory: 75992kb
input:
58 1499 751071830 198863820 292534250 533580356 205272669 522998611 544079196 862157715 390778805 173487948 2829675 199144838 675250424 278673908 174319522 917235530 482538942 310120418 499417216 744352970 198105466 851050201 324562569 348438015 496335083 992485291 846615552 237913613 805117120 5265...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
result:
wrong answer expected NO, found YES [10th token]
Test #10:
score: 0
Wrong Answer
time: 705ms
memory: 77692kb
input:
63 1522 804799017 382423356 136999262 517603642 272623548 81400703 177936492 183644706 811008901 195348189 420358926 621889115 536952352 617681319 415690825 430566736 944543466 941130403 758469932 177203809 35830351 321068848 919341658 612155458 741714933 350499007 364263342 739984562 253160541 1993...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
result:
wrong answer expected NO, found YES [8th token]