QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#710253#1983. CakesbecaidoAC ✓0ms3720kbC++20788b2024-11-04 19:12:192024-11-04 19:12:20

Judging History

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

  • [2024-11-04 19:12:20]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3720kb
  • [2024-11-04 19:12:19]
  • 提交

answer

#pragma GCC optimize("Ofast,unroll-loops")
#include <bits/stdc++.h>
using namespace std;

#ifdef WAIMAI
#define debug(HEHE...) cout<<"["<<#HEHE<<"] : ",dout(HEHE)
void dout(){cout<<'\n';}
template<typename T,typename...U>
void dout(T t,U...u){cout<<t<<(sizeof...(u)?", ":""),dout(u...);}
#else
#define debug(...) 7122
#endif

#define int long long
#define ll long long
#define Waimai ios::sync_with_stdio(false),cin.tie(0)
#define FOR(x,a,b) for(int x=a,I=b;x<=I;x++)
#define pb emplace_back
#define F first
#define S second

void solve() {
    int n;
    cin >> n;
    int ans = 1e9;
    FOR (i, 1, n) {
        int x, y;
        cin >> x >> y;
        ans = min (ans, y / x);
    }
    cout << ans << '\n';
}

int32_t main() {
    Waimai;
	solve();
}

详细

Test #1:

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

input:

1
1 1

output:

1

result:

ok single line: '1'

Test #2:

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

input:

2
1 5000
5 10000

output:

2000

result:

ok single line: '2000'

Test #3:

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

input:

2
1 5000
6 10000

output:

1666

result:

ok single line: '1666'

Test #4:

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

input:

10
173 1561
416 3733
449 3063
1207 7353
520 3024
910 6063
687 4589
1779 9402
1115 5874
819 5083

output:

5

result:

ok single line: '5'

Test #5:

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

input:

10
336 3217
923 6730
568 5620
154 1446
1069 9055
976 5941
561 3259
474 3121
983 7153
739 4827

output:

5

result:

ok single line: '5'

Test #6:

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

input:

10
660 5741
983 9463
518 4992
1096 9177
713 6122
509 3658
463 3259
242 2284
195 1609
1130 8178

output:

7

result:

ok single line: '7'

Test #7:

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

input:

10
2 2815
1 1438
3 4158
5 6799
5 6638
3 5753
5 9420
2 4404
1 2165
1 2136

output:

1327

result:

ok single line: '1327'