QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#55459#2965. RSA MistakeSayedHassan#WA 2ms3692kbC++885b2022-10-13 20:48:302022-10-13 20:48:32

Judging History

This is the latest submission verdict.

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-10-13 20:48:32]
  • Judged
  • Verdict: WA
  • Time: 2ms
  • Memory: 3692kb
  • [2022-10-13 20:48:30]
  • Submitted

answer

#pragma GCC optimize("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("avx,avx2,fma")
#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define fi first
#define sc second
vector<int> solve(int x)
{
    vector<int> v;
    for(ll i=2;i*i<=x;i++)
    {
        while(x%i==0)
        {
            v.push_back(i);
            x/=i;
        }
    }
    if(x!=1)v.push_back(x);
    return v;
}
map<ll,int> f;
int main()
{
	int n,m;
	cin>>n>>m;
	vector<int> v1=solve(n),v2=solve(m);
	if(v1.size()==1&&v2.size()==1&&n!=m)
    {
        cout<<"full credit";
    }
    else
    {
        for(auto x:v1)f[x]++;
        for(auto x:v2)f[x]++;
        for(auto x:f)if(x.sc>1)
        {
            cout<<"no credit";
            return 0;
        }
        cout<<"partial credit";
    }
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3628kb

input:

13 23

output:

full credit

result:

ok single line: 'full credit'

Test #2:

score: 0
Accepted
time: 1ms
memory: 3692kb

input:

35 6

output:

partial credit

result:

ok single line: 'partial credit'

Test #3:

score: 0
Accepted
time: 2ms
memory: 3600kb

input:

4 5

output:

no credit

result:

ok single line: 'no credit'

Test #4:

score: 0
Accepted
time: 2ms
memory: 3656kb

input:

17 17

output:

no credit

result:

ok single line: 'no credit'

Test #5:

score: 0
Accepted
time: 2ms
memory: 3516kb

input:

15 21

output:

no credit

result:

ok single line: 'no credit'

Test #6:

score: 0
Accepted
time: 2ms
memory: 3464kb

input:

545528636581 876571629707

output:

no credit

result:

ok single line: 'no credit'

Test #7:

score: -100
Wrong Answer
time: 2ms
memory: 3608kb

input:

431348146441 3

output:

partial credit

result:

wrong answer 1st lines differ - expected: 'no credit', found: 'partial credit'