QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#673506#9227. Henry the Plumberucup-team191#WA 0ms3624kbC++231.0kb2024-10-24 23:07:502024-10-24 23:07:51

Judging History

This is the latest submission verdict.

  • [2024-10-24 23:07:51]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3624kb
  • [2024-10-24 23:07:50]
  • Submitted

answer

#include <bits/stdc++.h>
#define x first
#define y second
using namespace std;
using ll=long long;
using pii=pair<int,int>;
using vi=vector<int>;
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;

int t;

array<int,3> sub(array<int,3> a,array<int,3> b)
{
	return {a[0]-b[0],a[1]-b[1],a[2]-b[2]};
}

int dot(array<int,3> a,array<int,3> b)
{
	return a[0]*b[0]+a[1]*b[1]+a[2]*b[2];
}

array<int,3> nu;

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cin>>t;
	while (t--)
	{
		array<int,3> a1,d1,a2,d2;
		for (int i=0;i<3;++i) cin>>a1[i];
		for (int i=0;i<2;++i) cin>>d1[i];
		d1[2]=0;
		for (int i=0;i<3;++i) cin>>a2[i];
		for (int i=0;i<2;++i) cin>>d2[i];
		d2[2]=0;
		if (dot(d1,sub(a2,a1))==0 && dot(d2,sub(a2,a1))==0)
		{
			cout<<2<<en;
			continue;
		}
		if (dot(d1,d2)*dot(d1,d2)==dot(d1,d1)*dot(d2,d2))
		{
			cout<<4<<en;
			continue;
		}
		cout<<3<<en;
	}
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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: 3552kb

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'