QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#821577#9068. Triple SevensWeaRD276#AC ✓0ms3708kbC++201.1kb2024-12-19 16:44:542024-12-19 16:44:55

Judging History

你现在查看的是最新测评结果

  • [2024-12-19 16:44:55]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3708kb
  • [2024-12-19 16:44:54]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
#define x first
#define y second
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--)

typedef long long ll;
typedef double db;
typedef long double LD;
typedef pair<int, int> pii;
typedef pair<db, db> pdd;
typedef pair<ll, ll> pll;


int solve()
{
	int n;
	if (!(cin >> n))
		return 1;
	
	bool ok = 1;
	FOR (j, 0, 3)
	{
		bool cur = 0;
		FOR (i, 0, n)
		{
			int a;
			cin >> a;
			cur |= a == 7;
		}
		ok &= cur;
	}
	
	if (!ok)
	{
		cout << "0\n";
		return 0;
	}
		cout << "777\n";
	
	return 0;
}

int32_t main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	int TET = 1e9;
	//cin >> TET;
	for (int i = 1; i <= TET; i++)
	{
		if (solve())
		{
			break;
		}
		#ifdef ONPC
			cerr << "_____________________________\n";
		#endif
	}
	#ifdef ONPC
		cerr << "\nfinished in " << clock() * 1.0 / CLOCKS_PER_SEC << " sec\n";
	#endif
	return 0;
}

详细

Test #1:

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

input:

2
0 7
7 3
7 0

output:

777

result:

ok single line: '777'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3640kb

input:

2
0 7
7 3
3 9

output:

0

result:

ok single line: '0'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

1
7
7
7

output:

777

result:

ok single line: '777'

Test #4:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

10
5 6 3 2 8 1 9 7 0 4
5 9 0 4 8 6 7 2 3 1
9 1 0 4 5 3 2 7 6 8

output:

777

result:

ok single line: '777'

Test #5:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

1
6
0
8

output:

0

result:

ok single line: '0'

Test #6:

score: 0
Accepted
time: 0ms
memory: 3704kb

input:

2
6 7
0 7
8 7

output:

777

result:

ok single line: '777'

Test #7:

score: 0
Accepted
time: 0ms
memory: 3708kb

input:

2
1 6
3 9
8 4

output:

0

result:

ok single line: '0'

Test #8:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

3
1 7 6
7 9 3
7 8 4

output:

777

result:

ok single line: '777'

Test #9:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

3
2 4 6
3 4 8
1 8 5

output:

0

result:

ok single line: '0'

Test #10:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

4
2 4 7 6
7 3 8 4
5 8 7 1

output:

777

result:

ok single line: '777'

Test #11:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

4
4 6 3 2
4 8 3 6
3 4 5 8

output:

0

result:

ok single line: '0'

Test #12:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

5
3 7 4 2 6
7 8 6 4 3
3 5 4 8 7

output:

777

result:

ok single line: '777'

Test #13:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

5
3 5 1 0 6
4 8 9 5 2
5 2 9 8 4

output:

0

result:

ok single line: '0'

Test #14:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

6
1 0 6 3 7 5
9 5 2 8 4 7
4 2 9 7 8 5

output:

777

result:

ok single line: '777'

Test #15:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

6
0 3 2 1 4 8
2 1 3 0 9 6
6 4 2 8 5 9

output:

0

result:

ok single line: '0'

Test #16:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

7
3 1 7 8 4 0 2
7 2 1 3 9 0 6
2 7 5 4 8 9 6

output:

777

result:

ok single line: '777'

Test #17:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

7
4 9 6 2 8 1 3
5 6 1 8 9 0 2
8 6 2 1 4 5 0

output:

0

result:

ok single line: '0'

Test #18:

score: 0
Accepted
time: 0ms
memory: 3708kb

input:

8
2 7 6 8 1 4 9 3
9 1 7 5 0 2 8 6
8 0 4 1 7 6 5 2

output:

777

result:

ok single line: '777'

Test #19:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

8
3 0 5 9 1 4 6 2
0 4 6 1 2 9 5 8
6 9 1 4 2 8 5 0

output:

0

result:

ok single line: '0'

Test #20:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

9
7 6 4 3 5 1 2 9 0
9 6 5 4 7 0 1 8 2
6 4 5 1 8 0 7 9 2

output:

777

result:

ok single line: '777'

Test #21:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

9
8 9 4 6 5 1 0 2 3
9 2 0 3 8 4 5 6 1
8 4 9 0 6 3 2 5 1

output:

0

result:

ok single line: '0'