Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
77549 sh25_shenpy 铺地毯 C++ 运行出错 0 MS 88 KB 489 2025-12-26 14:26:01

Tests(0/1):


#include<iostream> #include<cstring> using namespace std; const int MAXN = 10000 + 5; int v[MAXN][MAXN]; //爆0的罪魁祸首 int main() { memset(v, -1, sizeof(v)); int n; cin >> n; for(int i = 1; i <= n; i++) { int a, b, g, k; cin >> a >> b >> g >> k; for(int x = a; x <= a + g; x++) { for(int y = b; y <= b + k; y++) { v[x][y] = i; } } } int x, y; cin >> x >> y; cout << v[x][y] << endl; return 0; }


测评信息: