QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#55460#2965. RSA MistakeSayedHassan#WA 2ms3692kbC++1.1kb2022-10-13 20:51:532022-10-13 20:51:54

Judging History

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

  • [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:51:54]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3692kb
  • [2022-10-13 20:51:53]
  • 提交

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)
        {
            if(f[x])
            {
                cout<<"no credit";
                return 0;
            }
            f[x]++;
        }
        for(auto x:v2)
        {
            if(f[x])
            {
                cout<<"no credit";
                return 0;
            }
            f[x]++;
        }
        cout<<"partial credit";
    }
	return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 2ms
memory: 3612kb

input:

13 23

output:

full credit

result:

ok single line: 'full credit'

Test #2:

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

input:

35 6

output:

partial credit

result:

ok single line: 'partial credit'

Test #3:

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

input:

4 5

output:

no credit

result:

ok single line: 'no credit'

Test #4:

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

input:

17 17

output:

no credit

result:

ok single line: 'no credit'

Test #5:

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

input:

15 21

output:

no credit

result:

ok single line: 'no credit'

Test #6:

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

input:

545528636581 876571629707

output:

partial credit

result:

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