QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#792049 | #9267. Adventure in Flatland | bulijiojiodibuliduo# | AC ✓ | 1ms | 4100kb | C++17 | 906b | 2024-11-28 23:05:36 | 2024-11-28 23:05:37 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
typedef vector<int> VI;
typedef basic_string<int> BI;
typedef long long ll;
typedef pair<int,int> PII;
typedef double db;
mt19937 mrand(random_device{}());
const ll mod=1000000007;
int rnd(int x) { return mrand() % x;}
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
// head
int px,py,qx,qy,cnt;
int sgn(int x) {
return x>0;
}
int main() {
scanf("%d%d%d%d",&px,&py,&qx,&qy);
if (sgn(px)!=sgn(qx)) cnt=1;
if (sgn(py)!=sgn(qy)) cnt=1;
printf("%d\n",cnt);
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3824kb
input:
25 11 -20 -20
output:
1
result:
ok answer is '1'
Test #2:
score: 0
Accepted
time: 1ms
memory: 3756kb
input:
20 20 20 21
output:
0
result:
ok answer is '0'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
10000 -10000 -10000 -10000
output:
1
result:
ok answer is '1'
Test #4:
score: 0
Accepted
time: 0ms
memory: 4060kb
input:
10000 -10000 -10000 10000
output:
1
result:
ok answer is '1'
Test #5:
score: 0
Accepted
time: 1ms
memory: 3808kb
input:
-10000 -10000 10000 10000
output:
1
result:
ok answer is '1'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3756kb
input:
10000 10000 10000 10000
output:
0
result:
ok answer is '0'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3888kb
input:
2904 -7215 1663 -5179
output:
0
result:
ok answer is '0'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3780kb
input:
1091 -542 7868 -5687
output:
0
result:
ok answer is '0'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3812kb
input:
-1048 7838 4346 -2944
output:
1
result:
ok answer is '1'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3752kb
input:
3959 -2780 1099 -9402
output:
0
result:
ok answer is '0'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
-7238 -8548 -2917 -3821
output:
0
result:
ok answer is '0'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
295 2713 -8661 -856
output:
1
result:
ok answer is '1'
Test #13:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3945 7651 -543 -8216
output:
1
result:
ok answer is '1'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3844kb
input:
5024 5798 -3384 8583
output:
1
result:
ok answer is '1'
Test #15:
score: 0
Accepted
time: 0ms
memory: 3840kb
input:
5955 -1208 -385 3068
output:
1
result:
ok answer is '1'
Test #16:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
2968 340 -272 6559
output:
1
result:
ok answer is '1'
Test #17:
score: 0
Accepted
time: 0ms
memory: 3800kb
input:
5075 4537 4343 5126
output:
0
result:
ok answer is '0'
Test #18:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
8281 639 2572 1700
output:
0
result:
ok answer is '0'
Test #19:
score: 0
Accepted
time: 0ms
memory: 3752kb
input:
9317 819 -1316 -9854
output:
1
result:
ok answer is '1'
Test #20:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
-1137 -3421 718 9368
output:
1
result:
ok answer is '1'
Test #21:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
2294 -8164 -6369 7513
output:
1
result:
ok answer is '1'
Test #22:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
6565 9525 -1352 5554
output:
1
result:
ok answer is '1'
Test #23:
score: 0
Accepted
time: 0ms
memory: 3796kb
input:
-1609 -9745 -9663 6735
output:
1
result:
ok answer is '1'
Test #24:
score: 0
Accepted
time: 0ms
memory: 3752kb
input:
2511 -8215 -9994 2080
output:
1
result:
ok answer is '1'
Test #25:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
3296 629 -4812 3474
output:
1
result:
ok answer is '1'
Test #26:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
-6283 -1688 5290 -3518
output:
1
result:
ok answer is '1'
Test #27:
score: 0
Accepted
time: 0ms
memory: 3884kb
input:
2625 -6421 2867 -7497
output:
0
result:
ok answer is '0'
Test #28:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
-7999 1083 4777 4105
output:
1
result:
ok answer is '1'
Test #29:
score: 0
Accepted
time: 0ms
memory: 3696kb
input:
2020 -3780 3144 6817
output:
1
result:
ok answer is '1'
Test #30:
score: 0
Accepted
time: 1ms
memory: 4096kb
input:
5035 -8028 5857 -9678
output:
0
result:
ok answer is '0'
Test #31:
score: 0
Accepted
time: 0ms
memory: 3800kb
input:
5723 -3602 -2861 6115
output:
1
result:
ok answer is '1'
Test #32:
score: 0
Accepted
time: 1ms
memory: 4100kb
input:
-8199 8109 -9929 4601
output:
0
result:
ok answer is '0'
Test #33:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
-6350 3819 5575 -1173
output:
1
result:
ok answer is '1'
Test #34:
score: 0
Accepted
time: 0ms
memory: 3752kb
input:
-9608 -2422 -9939 7026
output:
1
result:
ok answer is '1'
Test #35:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
2756 -4668 5423 -2597
output:
0
result:
ok answer is '0'
Test #36:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
-6125 -9578 819 -9810
output:
1
result:
ok answer is '1'
Test #37:
score: 0
Accepted
time: 0ms
memory: 3840kb
input:
5083 2252 9307 -423
output:
1
result:
ok answer is '1'
Test #38:
score: 0
Accepted
time: 0ms
memory: 3800kb
input:
-9109 6674 1439 2799
output:
1
result:
ok answer is '1'
Test #39:
score: 0
Accepted
time: 1ms
memory: 4096kb
input:
-307 3189 -4905 -9883
output:
1
result:
ok answer is '1'
Test #40:
score: 0
Accepted
time: 0ms
memory: 3892kb
input:
-9920 4118 6636 -8587
output:
1
result:
ok answer is '1'
Test #41:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
-1840 -572 -9335 -5787
output:
0
result:
ok answer is '0'
Test #42:
score: 0
Accepted
time: 0ms
memory: 3800kb
input:
-7658 -9104 9827 1203
output:
1
result:
ok answer is '1'
Extra Test:
score: 0
Extra Test Passed