QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#821546 | #9068. Triple Sevens | Teapot# | AC ✓ | 0ms | 3724kb | C++14 | 1.4kb | 2024-12-19 16:32:59 | 2024-12-19 16:32:59 |
Judging History
answer
/** gnu specific **/
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
/** contains everything I need in std **/
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(S) ((int)S.size())
#define FOR(i, st_, n) for(int i = st_; i < n; ++i)
#define RFOR(i, n, end_) for(int i = (n)-1; i >= end_; --i)
#define x first
#define y second
#define pb push_back
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
typedef pair<double, double> pdd;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ull, ull> pull;
using namespace __gnu_pbds;
typedef tree<ll, null_type, less<>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
using namespace std;
#ifdef ONPC
mt19937 rnd(228);
#else
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
#endif
int32_t main()
{
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin >> n;
bool t = true;
ll a;
FOR(_,0,3)
{
bool t1 = false;
FOR(i,0,n)
{
cin >> a;
if(a == 7)
t1 = true;
}
if(!t1)
t = false;
}
if(t)
cout << 777;
else
cout << 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3724kb
input:
2 0 7 7 3 7 0
output:
777
result:
ok single line: '777'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
2 0 7 7 3 3 9
output:
0
result:
ok single line: '0'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
1 7 7 7
output:
777
result:
ok single line: '777'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3588kb
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: 3612kb
input:
1 6 0 8
output:
0
result:
ok single line: '0'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
2 6 7 0 7 8 7
output:
777
result:
ok single line: '777'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
2 1 6 3 9 8 4
output:
0
result:
ok single line: '0'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3664kb
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: 3652kb
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: 3552kb
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: 3656kb
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: 3660kb
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: 3612kb
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: 3508kb
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: 3668kb
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: 3632kb
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: 3580kb
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: 3660kb
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: 3664kb
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: 3668kb
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: 3668kb
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'