QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#493270#9107. Zayin and CountSocialPandaWA 450ms3544kbC++231.1kb2024-07-26 23:43:462024-07-26 23:43:47

Judging History

你现在查看的是最新测评结果

  • [2024-07-26 23:43:47]
  • 评测
  • 测评结果:WA
  • 用时:450ms
  • 内存:3544kb
  • [2024-07-26 23:43:46]
  • 提交

answer

#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")

#include <bits/stdc++.h>
//#define int long long
//#define LL long long
#define double long double
//#define lf Lf
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define endl "\n"
#define PII pair<int,int>
#define Gheap priority_queue<int,vector<int>,greater<int>>
#define Lheap priority_queue<int>
#define MAXN 0x3f3f3f3f
#define MINN -0x3f3f3f3f
using namespace std;
//const int N=1e6+100,M=2*N;
//int e[N],w[M],h[M],ne[M],idx;

void solve()
{
	string na,nb;
    string a,b;
    for(int i=0;i<10;i++)
    {
    	int num;cin>>num;
    	if(num) a+=char('0'+i);
    }
    for(int i=0;i<10;i++)
    {
    	int num;cin>>num;
    	if(num) b+=char('0'+i);
    }
    cin>>na;

    do
    {
    	if(a==na)
    	{
    		cout<<b<<endl;
    		break;
    	}
    	next_permutation(b.begin(),b.end());
    }
    while(next_permutation(a.begin(),a.end()));

}

int main()
{
    std::ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int tt=1;
    cin >> tt;
    while(tt--) solve();
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 450ms
memory: 3544kb

input:

10000
1 0 0 0 1 1 0 0 0 1
0 0 1 0 1 1 1 1 0 0
950595954440050004054505054050
1 0 0 0 1 1 1 1 0 0
1 1 1 0 1 0 0 0 1 1
45467007076660767550460064
1 1 1 1 0 0 0 1 0 0
1 1 0 1 1 0 1 0 0 1
23373171320213300170200722
0 0 0 0 1 1 1 0 1 0
0 0 1 0 0 1 0 1 1 1
558565664666565565558468668484
1 1 0 0 1 0 1 0 1 ...

output:


result:

wrong answer 1st lines differ - expected: '52755244567262766742575722', found: ''