1 条题解
-
0
// By ChatGPT 4o mini #include <iostream> #include <vector> using namespace std; int main() { int n, L, R; cin >> n >> L >> R; vector<int> T(n), M(n), t(n), m(n); // Read T_i and M_i for (int i = 0; i < n; ++i) { cin >> T[i] >> M[i]; } // Read t_i and m_i for (int i = 0; i < n; ++i) { cin >> t[i] >> m[i]; } // Get results for each submission for (int i = 0; i < n; ++i) { // Check if the machine is asleep if (i + 1 >= L && i + 1 <= R) { cout << "System Error" << endl; // +1 because input uses 1-based indexing } else { // Calculate the effective running time int effectiveTime = T[i] / 2; // Check memory limits if (M[i] > m[i]) { cout << "Memory Limit Exceeded" << endl; } else if (effectiveTime > t[i]) { cout << "Time Limit Exceeded" << endl; } else { cout << "Accepted" << endl; } } } return 0; }
- 1
信息
- ID
- 16
- 时间
- 1000ms
- 内存
- 512MiB
- 难度
- 1
- 标签
- (无)
- 递交数
- 4
- 已通过
- 4
- 上传者