提交记录 14949
| 提交时间 |
评测时间 |
| 2020-11-14 03:28:18 |
2020-11-14 03:28:27 |
// fileName: test_O0_Interchanging_loops_Unroll_loops_8.cpp
#pragma GCC optimize("O0")
#include <cstdio>
#include <random>
#include <chrono>
std::mt19937 rng(std::chrono::steady_clock::now().time_since_epoch().count());
typedef unsigned int UI;
typedef unsigned long long ULL;
const UI Mod = 998244353;
const int N = 1200;
UI A[N][N], B[N][N], C[N][N];
void Mul() {
for (int i = 0; i < N; ++i)
for (int k = 0; k < N; ++k)
for (int j = 0; j < N; j += 8) {
C[i][j ] = (C[i][j ] + (ULL)A[i][k] * B[k][j ]) % Mod;
C[i][j + 1] = (C[i][j + 1] + (ULL)A[i][k] * B[k][j + 1]) % Mod;
C[i][j + 2] = (C[i][j + 2] + (ULL)A[i][k] * B[k][j + 2]) % Mod;
C[i][j + 3] = (C[i][j + 3] + (ULL)A[i][k] * B[k][j + 3]) % Mod;
C[i][j + 4] = (C[i][j + 4] + (ULL)A[i][k] * B[k][j + 4]) % Mod;
C[i][j + 5] = (C[i][j + 5] + (ULL)A[i][k] * B[k][j + 5]) % Mod;
C[i][j + 6] = (C[i][j + 6] + (ULL)A[i][k] * B[k][j + 6]) % Mod;
C[i][j + 7] = (C[i][j + 7] + (ULL)A[i][k] * B[k][j + 7]) % Mod;
}
}
#ifdef PKRBT
int main() {
#else
void matrix_multiply(int, const double *, const double *, double *) {
#endif
for (int i = 0; i < N; ++i) {
for (int j = 0; j < N; ++j) {
A[i][j] = rng() % Mod;
B[i][j] = rng() % Mod;
C[i][j] = 0;
}
}
Mul();
UI Ans = 0;
for (int i = 0; i < N; ++i)
for (int j = 0; j < N; ++j)
Ans ^= C[i][j];
printf("%u\n", Ans);
#ifdef PKRBT
return 0;
#endif
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 6.997 s | 16 MB + 508 KB | Wrong Answer | Score: 0 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-03-21 15:54:43 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠