QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#228438 | #7638. Lake | ucup-team1448# | WA | 0ms | 1640kb | C++17 | 796b | 2023-10-28 13:30:47 | 2023-10-28 13:30:48 |
Judging History
answer
//#define dxx
#ifdef dxx
#define dbg(...) fprintf(stderr,__VA_ARGS__)
#define dex(a) dbg(#a"=%lld onL%d infun %s\n",a,__LINE__,__FUNCTION__)
#include<cstdlib>
#define pause sys##tem("pause")
#define _GLIBCXX_DEBUG
#endif
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cstdlib>
#include<vector>
using ll=long long;
using std::max;
using std::min;
using std::abs;
template<class T> void cmax(T&a,T b){a=max(a,b);}
template<class T> void cmin(T&a,T b){a=min(a,b);}
template<class T> T sqr(T a){return a*a;}
namespace xm{
void _(){
int N,M,child;
scanf("%d%d",&N,&M);
child=(M+3)/4;
printf("%d\n",2*(child*3>=N?child:child+(N-child*3+3-(child*4>M))/4)-1);
}
}
int main(){
xm::_();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 1608kb
input:
1 1
output:
1
result:
ok single line: '1'
Test #2:
score: 0
Accepted
time: 0ms
memory: 1528kb
input:
1 4
output:
1
result:
ok single line: '1'
Test #3:
score: 0
Accepted
time: 0ms
memory: 1620kb
input:
5 5
output:
3
result:
ok single line: '3'
Test #4:
score: 0
Accepted
time: 0ms
memory: 1600kb
input:
4 4
output:
3
result:
ok single line: '3'
Test #5:
score: 0
Accepted
time: 0ms
memory: 1540kb
input:
3 4
output:
1
result:
ok single line: '1'
Test #6:
score: 0
Accepted
time: 0ms
memory: 1640kb
input:
8 12
output:
5
result:
ok single line: '5'
Test #7:
score: -100
Wrong Answer
time: 0ms
memory: 1592kb
input:
12 8
output:
7
result:
wrong answer 1st lines differ - expected: '5', found: '7'