| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 214531 | 宋明熙 | 均分纸牌 | C++ | Accepted | 100 | 0 MS | 240 KB | 488 | 2026-07-20 21:22:58 |
#include <iostream> using namespace std; int main() { int n; cin >> n; int a[105]; int sum = 0; for (int i = 0; i < n; i++) { cin >> a[i]; sum += a[i]; } int avg = sum / n; int moves = 0; int carry = 0; // 从左往右累积的差值 for (int i = 0; i < n; i++) { carry += a[i] - avg; if (carry != 0) { moves++; } } cout << moves << endl; return 0; }