QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#659017#7111. Press the Button11131241WA 0ms3520kbC++171.6kb2024-10-19 18:15:092024-10-19 18:15:14

Judging History

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

  • [2024-10-19 18:15:14]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3520kb
  • [2024-10-19 18:15:09]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef unsigned long long ull;
using ld = long double;
#define PII pair<int, int>
#define inf 0x3f3f3f3f
#define INF 0x7fffffff
#define lowbit(x) ((x) & (-x))
double PI = acos(-1.0);
#define eps 1e-7
const int d[4][2] = { {1, 0}, {-1, 0}, {0, 1}, {0, -1} };
const int maxn = 2e8 + 5;
const int mod = 998244353;
const int N = 1011;
int fast_Pow(int a, int n, int mod)
{
    int ans = 1 % mod;
    a %= mod;
    while (n)
    {
        if (n & 1)
            ans = (ans * a) % mod;
        a = (a * a) % mod;
        n >>= 1;
    }
    return ans;
}


void solve()
{
    int a, b, c, d,v;
    int t;
    int cnt = 0;
    int now =0;
    int time = 0;
    
    cin >> a >> b >> c >> d >>v>> t;
    t *= 2;
    time = v * 2 + 1;
    while (now <= t)
    {
        
        for (int i =time; i > 0; i--)
        {

            if (now == t)
            {
                if ((i / 2) % a == 0 and i % 2 == 0)
                    cnt ++;
                else  if ((i / 2) % b == 0 and i % 2 == 0)
                    cnt ++;
                now++;
                break;
            }
            
            if ((i / 2) % a == 0 and i%2==0)
                cnt += b;
            if ((i / 2) % c == 0 and i % 2 == 0)
                cnt += d;
            now++;

        }
        now++;
    }
    
    cout << cnt<<endl;
}
signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int tcase = 1;
    cin >> tcase;
    while (tcase--)
        solve();
    return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3520kb

input:

2
8 2 5 1 2 18
10 2 5 1 2 10

output:

0
0

result:

wrong answer 1st numbers differ - expected: '6', found: '0'