QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#781291 | #9743. 重心树 | Zpair | WA | 0ms | 3856kb | C++20 | 367b | 2024-11-25 15:34:00 | 2024-11-25 15:34:01 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int N=2e5+5;
int n;
void solve(){
scanf("%d",&n);
vector<pair<int, int> > ans;
for(int i=1;i<=n;++i){
int x,y;
scanf("%d",&x);
while(x--){
scanf("%d",&y);
ans.push_back({i,y});
}
}
for(auto [x,y]:ans)
printf("%d %d\n",x,y);
}
int main(){
int T;cin>>T;
while(T--)solve();
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3856kb
input:
2 4 2 3 4 1 3 0 0 3 1 3 1 3 0
output:
1 3 1 4 2 3 1 3 2 3
result:
wrong answer The index of the node i's father should less than i (test case 1)