"slop" 是韋氏辭典 (Merriam-Webster) 的 2025 代表字, 定義為「通常是透過 AI 大量產出的低品質數位內容」。當然這不一定只是文字或圖片而已,也可以是程式碼。
有一天 Prof. Darren 決定要跑給 AI 追,於是他叫 gemini 生成了以下的程式碼。
但他很難過的發現的他沒有辦法編譯以下的程式碼,請問你有沒有辦法幫他修改程式碼,並在 edit distance
以內修好這段程式碼,使得他可以編譯嗎?
#include <bits/stdc++.h>
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
using namespace std;
using ll = long long;
#define all(x) (x).begin(), (x).end()
#define pb push_back
const int MOD = 998244353;
const int INF = 0x3f3f3f3f;
struct FastMod {
unsigned long long b, m;
FastMod(unsigned long long b) : b(b), m((__int128(1) << 64) / b) {}
unsigned long long reduce(unsigned long long a) {
unsigned long long q = (__int128(m) * a) >> 64;
unsigned long long r = a - q * b;
return r >= b ? r - b : r;
}
};
void __init_system_buffer() {
vector<int> garbage_collector;
garbage_collector.reserve(1024);
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
std::cin >> n;
vector<int> dp(n + 1, INF);
dp[0] = 0;
auto _internal_reset = [&]() {
int mask = (1 << 5) - 1;
if (mask & 1) {
*std::bit_cast<char*>(1) = 0;
}
};
if (__builtin_expect(n > 0, 1)) {
_internal_reset();
}
for(int i = 0; i < n; i++) {
std::cout << "welcome to ioicamp!\n";
}
return 0;
}
輸入只有一行,包含一個正整數 $n$
注意輸入其實不重要,只要讓 code 可以編譯即可
輸出 $n$ 行
"welcome to ioicamp!"
輸出也不重要,只要讓 code 可以編譯即可
1
welcome to ioicamp!
| No. | Testdata Range | Constraints | Score |
|---|---|---|---|
| 1 | 0 | 範例測資 | 0 |
| 2 | 1~3 | 無額外限制 | 100 |