Wrong Answer
Code
#include <iostream>
using namespace std;
int main() {
int T;
cin >> T;
while (T--) {
int N;
cin >> N;
if (N % 2 == 0) {
cout << N / 2 << endl; // Maximum partitions when N is even
} else {
cout << 1 << endl; // Only one partition when N is odd
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1052 Yet Another Array Partition
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-12-07 14:16:22
- Judged At
- 2024-12-07 14:16:22
- Judged By
- Score
- 10
- Total Time
- 2ms
- Peak Memory
- 580.0 KiB