QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#786854#5715. 幂次lopzith0 0ms0kbC++142.4kb2024-11-27 00:08:472024-11-27 00:08:47

Judging History

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

  • [2024-11-27 00:08:47]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2024-11-27 00:08:47]
  • 提交

answer

#include <bits/stdc++.h>
#include <bits/extc++.h>
using namespace __gnu_pbds;
#define DEFAULT 5e5 + 5
#define int long long
#define i64 long long
#define i128 __int128
#define ull unsigned long long
#define db double
#define ldb long double
#define Arr std::vector
#define Ptn std::pair
#define fi first
#define se second
#define eb emplace_back
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define popc(x) __builtin_popcountll(x)
#define clz(x) __builtin_clzll(x)
#define ctz(x) __builtin_ctzll(x)
#define chkmin(x, y) x = std::min(x, y)
#define chkmax(x, y) x = std::max(x, y)
#define FILE(x) freopen(x ".in", "r", stdin), freopen(x ".out", "w", stdout)
#define TEST(x) freopen(x ".in", "r", stdin), freopen("test.out", "w", stdout)
#define KEL(x) freopen(x ".in", "r", stdin), freopen("a.out", "w", stdout)
#define debug std::cout << "Running on " << __FUNCTION__ << ' ' << __LINE__ << std::endl;
#define fail assert(0);
#define lopzith return 0;
bool BeginPoint;
const int INF = 0x3f3f3f3f, llINF = 0x3f3f3f3f3f3f3f3f, P = 998244353;
const db eps = 1e-9;
const ull base = 13331;
const int N = 1e5 + 5;
int _, n, m, q, A[2][N], vis[2][N];

inline int read()
{
    int w = 0, f = 1;
    char ch = getchar();
    while (ch < '0' || ch > '9')
    {
        if (ch == '-') f = -1;
        ch = getchar();
    }
    while (ch >= '0' && ch <= '9')
    {
        w = (w << 3) + (w << 1) + (ch - 48);
        ch = getchar();
    }
    return w * f;
}

bool EndPoint;
signed main()
{
    std::cerr << "Memory = " << fabs(&BeginPoint - &EndPoint) / 1048576.0 << "MB" << std::endl;

    _ = read();
    while (_--)
    {
        memset(vis, 0, sizeof(vis)), memset(A, 0, sizeof(A));
        n = read(), m = read(), q = read();
        for (int i = 1; i <= q; i++)
        {
            int op = read(), x = read(), c = read();
            A[op][x] = c, vis[op][x] = i;
        }
        for (int i = 1; i <= n; i++)
        {
            for (int j = 1; j <= m; j++)
            {
                if (vis[0][i] < vis[1][j])
                {
                    printf("%lld ", A[1][j]);
                }
                else 
                {
                    printf("%lld ", A[0][i]);
                }
            }
            puts("");
        }
    }

    std::cerr << "Time = " << (double)clock() / CLOCKS_PER_SEC << "s" << std::endl;
    lopzith
}

详细


Pretests


Final Tests

Test #1:

score: 0
Time Limit Exceeded

input:

92 1

output:


result:


Test #2:

score: 0
Time Limit Exceeded

input:

96 2

output:


result:


Test #3:

score: 0
Time Limit Exceeded

input:

9383 3

output:


result:


Test #4:

score: 0
Time Limit Exceeded

input:

9830 2

output:


result:


Test #5:

score: 0
Time Limit Exceeded

input:

927700 3

output:


result:


Test #6:

score: 0
Time Limit Exceeded

input:

972504 2

output:


result:


Test #7:

score: 0
Time Limit Exceeded

input:

94345650 3

output:


result:


Test #8:

score: 0
Time Limit Exceeded

input:

98811802 2

output:


result:


Test #9:

score: 0
Time Limit Exceeded

input:

9328450690 3

output:


result:


Test #10:

score: 0
Time Limit Exceeded

input:

9775065820 2

output:


result:


Test #11:

score: 0
Time Limit Exceeded

input:

948459050000 3

output:


result:


Test #12:

score: 0
Time Limit Exceeded

input:

993120563000 2

output:


result:


Test #13:

score: 0
Time Limit Exceeded

input:

93781484300000 3

output:


result:


Test #14:

score: 0
Time Limit Exceeded

input:

98250912400000 2

output:


result:


Test #15:

score: 0
Time Limit Exceeded

input:

9272034040000000 3

output:


result:


Test #16:

score: 0
Time Limit Exceeded

input:

9981231040000000 2

output:


result:


Test #17:

score: 0
Time Limit Exceeded

input:

942817384000000000 3

output:


result:


Test #18:

score: 0
Time Limit Exceeded

input:

987478897000000000 2

output:


result:


Test #19:

score: 0
Time Limit Exceeded

input:

932205945000000000 2

output:


result:


Test #20:

score: 0
Time Limit Exceeded

input:

992520149596833024 2

output:


result: