QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#545503 | #9227. Henry the Plumber | QingTian | WA | 1ms | 3668kb | C++14 | 1.7kb | 2024-09-03 14:19:47 | 2024-09-03 14:19:52 |
Judging History
answer
/*
██████╗ ██╗███╗ ██╗ ██████╗ ████████╗██╗ █████╗ ███╗ ██╗
██╔═══██ ██║████╗ ██║██╔════╝ ╚══██╔══╝██║██╔══██╗████╗ ██║
██║ ██║██║██╔██╗ ██║██║ ███╗ ██║ ██║███████║██╔██╗ ██║
██║▄▄ ██║██║██║╚██╗██║██║ ██║ ██║ ██║██╔══██║██║╚██╗██║
╚██████╔╝██║██║ ╚████║╚██████╔╝ ██║ ██║██║ ██║██║ ╚████║
╚══▀▀═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝
*/
#include<bits/stdc++.h>
using namespace std;
typedef double ld;
typedef long long ll;
struct p3{
ll x,y,z;
friend p3 operator-(p3 a,p3 b){return {a.x+b.x,a.y+b.y,a.z+b.z};}
friend ll operator*(p3 a,p3 b){return a.x*b.x+a.y*b.y+a.z*b.z;}
friend p3 operator^(p3 a,p3 b){return {a.y*b.z-a.z*b.y,a.z*b.x-a.x*b.z,a.x*b.y-a.y*b.x};}
};
void solve(){
p3 st,ed,vst,ved;
cin>>st.x>>st.y>>st.z;
cin>>vst.x>>vst.y;
cin>>ed.x>>ed.y>>ed.z;
cin>>ved.x>>ved.y;
if((st-ed)*vst==0 && (st-ed)*ved==0){
cout<<2<<'\n';
}else{
if(vst.x*ved.y-vst.y*ved.x==0 ){//平面平行,叉积为0
cout<<4<<'\n';
}else{
cout<<3<<'\n';
}
}
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int _;cin>>_;
while(_--) solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3668kb
input:
2 -1 -1 3 1 1 2 2 3 2 2 5 5 1 3 0 7 6 -2 1 -2
output:
4 3
result:
ok 2 number(s): "4 3"
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3596kb
input:
100 -13 -5 -7 -19 19 -19 -13 0 -7 15 -20 20 19 -17 18 20 -20 -1 18 -19 -18 15 -14 -19 18 19 -20 6 20 -19 -12 9 1 7 -16 -13 -14 -8 8 -13 -19 16 9 20 -19 19 -18 -11 19 -18 19 20 -8 12 20 -11 -9 18 -19 -18 8 11 -13 12 -18 18 13 8 4 -18 -16 20 17 -19 18 20 -18 -3 20 -19 -17 -20 -5 -18 -19 19 16 15 19 20...
output:
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
result:
wrong answer 1st numbers differ - expected: '4', found: '3'