QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#568108 | #9308. World Cup | TwindT | WA | 0ms | 3772kb | C++20 | 1.7kb | 2024-09-16 15:16:22 | 2024-09-16 15:16:23 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
const int INF = 0x3f3f3f3f;
const int Mod = 1000000007;
int dx[4] = { 0,1,0,-1 }, dy[4] = { 1,0,-1,0 };
bool prime(int x)
{
if (x == 2) return true;
else if (x == 1 || x % 2 == 0) return false;
for (int i = 3; i <= sqrt(x) + 1; i++) if (x % i == 0) return false;
return true;
}
void get_primes(int n,ll N)
{
vector<int>primes(N);
vector<bool>st(N); // 质数为fasle
int cnt = 0;
for (int i = 2; i <= n; i ++ )
{
if (!st[i]) primes[cnt++] = i;
for (int j = 0; primes[j] <= n / i; j ++ )
{
st[primes[j] * i] = true;
if (i % primes[j] == 0) break;
}
}
}
ll qmi(int a, int b, int p) // a ^ b % p
{
ll res = 1 % p;
while (b)
{
if (b & 1) res = res * a % p;
a = a * (ll)a % p;
b >>= 1;
}
return res;
}
int gcd(int a, int b)
{
if (b == 0)
{
return a;
}
else
{
return gcd(b, a % b);
}
}
int lcm(int a, int b)
{
return (a / gcd(a, b)) * b;
}
void XJT___solve()
{
vector<int>v(33);
int num = 0;
for(int i = 2;i <= 32;i++) {
cin>>v[i];
if(v[i] < v[1]) num++;
}
if(num >= 32) cout<<1<<'\n';
else if(num >= 28) cout<<2<<'\n';
else if(num >= 14) cout<<4<<'\n';
else if(num >= 7) cout<<8<<'\n';
else if(num >= 3) cout<<16<<'\n';
else cout<<32<<'\n';
}
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
cout.tie(0);
int t = 1;
cin >> t;
while (t--)
{
XJT___solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3772kb
input:
1 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
output:
32
result:
wrong answer 1st numbers differ - expected: '1', found: '32'