QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#236407#3530. Small businessSoorrawWA 0ms3780kbC++14793b2023-11-03 22:19:462023-11-03 22:19:46

Judging History

This is the latest submission verdict.

  • [2023-11-03 22:19:46]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3780kb
  • [2023-11-03 22:19:46]
  • Submitted

answer

#define push_back pb
#define first fst
#define second sec
#include<bits/stdc++.h>
using namespace std;
typedef pair<int,int> pii;
typedef long long ll;
const int N=2e5+10,M=5e2+10,inf=0x3f3f3f3f,mod=1e9+7;//998244353;
const ll inff=0x3f3f3f3f3f3f3f3f;
typedef double db;
const db eps=1e-9;
string s;
void solve()
{
	cin>>s;
	vector<int>vx;
	int cnt=0;
	for(auto ch:s)
	{
		int x=ch-'0';
		if(x)
		vx.pb(x);
		else ++cnt;
	}
	int sz=s.size();
	if(sz<2||sz>36||sz-cnt<2)
	{
		cout<<"-1 -1\n";
		return;
	}
	sort(vx.begin(),vx.end());
	cout<<vx[0]<<' '<<vx[1]<<string(cnt,'0');
	for(int i=2;i<sz-cnt;i++)
	cout<<vx[i];
}
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	int T=1;
//	cin>>T;
//	T=read();
	while(T--)
	solve();
	return 0;
}

詳細信息

Test #1:

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

input:

123456

output:

1 23456

result:

ok ok

Test #2:

score: 0
Accepted
time: 0ms
memory: 3524kb

input:

42

output:

2 4

result:

ok ok

Test #3:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

000

output:

-1 -1

result:

ok ok

Test #4:

score: -100
Wrong Answer
time: 0ms
memory: 3780kb

input:

4418409405

output:

1 400444589

result:

wrong answer jury has the better answer