QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#229515 | #7638. Lake | ucup-team191# | WA | 0ms | 3700kb | C++14 | 601b | 2023-10-28 16:20:49 | 2023-10-28 16:20:49 |
Judging History
answer
#include <bits/stdc++.h>
#define x first
#define y second
using namespace std;
using pii=pair<int,int>;
using vi=vector<int>;
using ll=long long;
using vl=vector<ll>;
#define pb push_back
#define all(a) begin(a),end(a)
const int N=300010,MOD=1e9+7;
const char en='\n';
const ll LLINF=1ll<<60;
ll n, m, sol = LLINF;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n >> m;
for (long long int x = 0; x <= n + m; x++) {
long long int y = max((n - 3 * x + 3) / 4, (m - 4 * x + 2) / 3);
sol = min(sol, x + y);
}
cout << sol * 2 - 1 << endl;
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3604kb
input:
1 1
output:
1
result:
ok single line: '1'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
1 4
output:
1
result:
ok single line: '1'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
5 5
output:
3
result:
ok single line: '3'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
4 4
output:
3
result:
ok single line: '3'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
3 4
output:
1
result:
ok single line: '1'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
8 12
output:
5
result:
ok single line: '5'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
12 8
output:
5
result:
ok single line: '5'
Test #8:
score: -100
Wrong Answer
time: 0ms
memory: 3612kb
input:
8182 520051
output:
150925
result:
wrong answer 1st lines differ - expected: '260025', found: '150925'