Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
49124 | sql517843786 | 病人排队 | C++ | 解答错误 | 3 MS | 4156 KB | 527 | 2024-06-19 21:59:43 |
#include <iostream> #include <map> #include <algorithm> #include <vector> using namespace std; int n; struct node { string id; int old; int bianhao; }a[100005]; bool cmp(node x, node y) { if (x.old == y.old || (x.old < 60 && y.old < 60))return x.bianhao < y.bianhao; return x.old > y.old; } int main() { cin >> n; for (int i = 1; i <= n; i++) { cin >> a[i].id; cin >> a[i].old; a[i].bianhao = i; } sort(a + 1, a + 1 + n, cmp); for (int i = 1; i <= n; i++) { cout << 1 << endl; } }