QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#794789#9183. BouquetMousa_Aboubaker0 13ms4812kbC++201.5kb2024-11-30 16:06:072024-11-30 16:06:08

Judging History

This is the latest submission verdict.

  • [2024-11-30 16:06:08]
  • Judged
  • Verdict: 0
  • Time: 13ms
  • Memory: 4812kb
  • [2024-11-30 16:06:07]
  • Submitted

answer

#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <deque>
#include <climits>
#include <cmath>
#include <numeric>
#include <string>
#include <bitset>
#include <assert.h>
#include <iomanip>
using namespace std;
 
template <typename T>
using pqg = priority_queue<T, vector<T>, greater<T>>;
 
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
 
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
 
 
const long long infl = 1e18 + 1;
const int inf = 1e9 + 1;
const int mod1 = 1e9 + 7;
const int mod2 = 998244353;
const long double eps = 1e-7;
const int mod = mod1;
 
int add(int a, int b) { return (a + b) % mod; }
int sub(int a, int b) { return (a - b + mod) % mod; }
int mul(int a, int b) { return (int)((long long)a * b % mod); }
int pwr(int a, int b = mod - 2)
{
	int res = 1;
	for(; b > 0; b >>= 1, a = mul(a, a))
		if(b & 1)
			res = mul(res, a);
	return res;
}
 
void solve()
{
	int n;
	cin >> n;
	vector<pair<int, int>> a(n);
	for(auto &[f, s]: a)
		cin >> f >> s;
	cout << max(1, n / (a[0].first+ 1));
}
 
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
 
	int t = 1;
	// cin >> t;
 
	while (t--) {
		solve();
		cout << (t ? "\n" : "");
	}
}


Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 8
Accepted
time: 0ms
memory: 3872kb

input:

1
0 0

output:

1

result:

ok single line: '1'

Test #2:

score: 8
Accepted
time: 11ms
memory: 4732kb

input:

200000
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0...

output:

200000

result:

ok single line: '200000'

Test #3:

score: 0
Wrong Answer
time: 13ms
memory: 4804kb

input:

200000
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28...

output:

6896

result:

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

Subtask #2:

score: 0
Wrong Answer

Test #16:

score: 16
Accepted
time: 11ms
memory: 4628kb

input:

200000
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0...

output:

200000

result:

ok single line: '200000'

Test #17:

score: 16
Accepted
time: 0ms
memory: 3652kb

input:

1000
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0...

output:

1000

result:

ok single line: '1000'

Test #18:

score: 16
Accepted
time: 0ms
memory: 3608kb

input:

1
1 0

output:

1

result:

ok single line: '1'

Test #19:

score: 0
Wrong Answer
time: 9ms
memory: 4576kb

input:

200000
1 0
1 0
0 0
1 0
1 0
1 0
1 0
1 0
0 0
0 0
1 0
1 0
1 0
0 0
1 0
1 0
1 0
0 0
1 0
1 0
0 0
0 0
1 0
0 0
1 0
1 0
0 0
0 0
1 0
1 0
0 0
0 0
0 0
1 0
0 0
0 0
1 0
1 0
1 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
1 0
1 0
0 0
0 0
1 0
0 0
1 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
1 0
0 0
0 0
1 0
0 0
1 0
0 0
0 0
0 0
1 0
0 0
0 0
0...

output:

100000

result:

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

Subtask #3:

score: 0
Wrong Answer

Test #48:

score: 28
Accepted
time: 0ms
memory: 3584kb

input:

1000
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0...

output:

1000

result:

ok single line: '1000'

Test #49:

score: 28
Accepted
time: 0ms
memory: 3904kb

input:

1000
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4
4 4...

output:

200

result:

ok single line: '200'

Test #50:

score: 0
Wrong Answer
time: 0ms
memory: 3648kb

input:

1000
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
46 46
4...

output:

21

result:

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

Subtask #4:

score: 0
Wrong Answer

Test #127:

score: 18
Accepted
time: 11ms
memory: 4728kb

input:

200000
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0...

output:

200000

result:

ok single line: '200000'

Test #128:

score: 18
Accepted
time: 0ms
memory: 3812kb

input:

1000
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0...

output:

1000

result:

ok single line: '1000'

Test #129:

score: 0
Wrong Answer
time: 13ms
memory: 4812kb

input:

200000
1 0
1 0
0 0
1 0
1 0
1 0
1 0
1 0
0 0
0 0
1 0
1 0
1 0
0 0
1 0
1 0
1 0
0 0
1 0
1 0
0 0
0 0
1 0
0 0
1 0
1 0
0 0
0 0
1 0
1 0
0 0
0 0
0 0
1 0
0 0
0 0
1 0
1 0
1 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
1 0
1 0
0 0
0 0
1 0
0 0
1 0
0 0
0 0
0 0
0 0
1 0
0 0
0 0
0 0
1 0
0 0
0 0
1 0
0 0
1 0
0 0
0 0
0 0
1 0
0 0
0 0
0...

output:

100000

result:

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

Subtask #5:

score: 0
Wrong Answer

Test #155:

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

input:

1
0 0

output:

1

result:

ok single line: '1'

Test #156:

score: 30
Accepted
time: 11ms
memory: 4660kb

input:

200000
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0...

output:

200000

result:

ok single line: '200000'

Test #157:

score: 0
Wrong Answer
time: 13ms
memory: 4804kb

input:

200000
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28
28 28...

output:

6896

result:

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