QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#331599#5203. Easy AssemblyKevin5307#WA 1ms3740kbC++231.0kb2024-02-18 15:41:022024-02-18 15:41:03

Judging History

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

  • [2024-02-18 15:41:03]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3740kb
  • [2024-02-18 15:41:02]
  • 提交

answer

//Author: Kevin
#include<bits/stdc++.h>
//#pragma GCC optimize("O2")
using namespace std;
#define ll long long
#define ull unsigned ll
#define pb emplace_back
#define mp make_pair
#define ALL(x) (x).begin(),(x).end()
#define rALL(x) (x).rbegin(),(x).rend()
#define srt(x) sort(ALL(x))
#define rev(x) reverse(ALL(x))
#define rsrt(x) sort(rALL(x))
#define sz(x) (int)(x.size())
#define inf 0x3f3f3f3f
#define pii pair<int,int>
#define lb(v,x) (int)(lower_bound(ALL(v),x)-v.begin())
#define ub(v,x) (int)(upper_bound(ALL(v),x)-v.begin())
#define uni(v) v.resize(unique(ALL(v))-v.begin())
#define longer __int128_t
void die(string S){puts(S.c_str());exit(0);}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int n;
	cin>>n;
	int ans=n-1;
	int ans2=0;
	while(n--)
	{
		int k;
		cin>>k;
		vector<int> vec;
		while(k--)
		{
			int x;
			cin>>x;
			vec.pb(x);
		}
		for(int i=1;i<sz(vec);i++)
			if(vec[i-1]>vec[i])
				ans2++;
	}
	cout<<ans2<<" "<<ans+ans2<<endl;
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3740kb

input:

2
3 3 5 8
2 9 2

output:

1 2

result:

ok 2 number(s): "1 2"

Test #2:

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

input:

1
1 1

output:

0 0

result:

ok 2 number(s): "0 0"

Test #3:

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

input:

1
1 1000000000

output:

0 0

result:

ok 2 number(s): "0 0"

Test #4:

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

input:

1
2 1 2

output:

0 0

result:

ok 2 number(s): "0 0"

Test #5:

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

input:

1
2 1 3

output:

0 0

result:

ok 2 number(s): "0 0"

Test #6:

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

input:

1
2 2 3

output:

0 0

result:

ok 2 number(s): "0 0"

Test #7:

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

input:

1
2 2 1

output:

1 1

result:

ok 2 number(s): "1 1"

Test #8:

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

input:

1
2 3 1

output:

1 1

result:

ok 2 number(s): "1 1"

Test #9:

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

input:

1
2 1 1000000000

output:

0 0

result:

ok 2 number(s): "0 0"

Test #10:

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

input:

1
2 1000000000 1

output:

1 1

result:

ok 2 number(s): "1 1"

Test #11:

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

input:

1
10 469824905 571701214 23624320 688416005 50705647 146779011 168882039 274124876 425787403 398650749

output:

3 3

result:

wrong answer 1st numbers differ - expected: '5', found: '3'