编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#20073 #5. 慢速排序/交互题测试 Accepted 100 721 ms 408 K C++ 11 / 469 B 192024211876 2024-12-08 15:39:48
显示原始代码
#include <bits/stdc++.h>
using namespace std;

int main() {
    int t;
    cin >> t;
    while (t--) {
        int n;
        cin >> n;
        for (int i = 1; i < n; i++) {
            for (int j = 1; j <= n - i; j++) {
                cout << "c " << j << " " << j + 1 << endl;
                cout.flush();
                char a;
                cin >> a;
                if (a == '>') {
                    cout << "s " << j << " " << j + 1 << endl;
                    cout.flush();
                }
            }
        }
        cout << "e" << endl;
        cout.flush();
    }

    return 0;
}
子任务 #1
Accepted
得分:100
测试点 #1
Accepted
得分:100
用时:61 ms
内存:400 KiB

输入文件(1.in

1
100
743781 147215 632500 733399 151404 855564 158551 538029 58980 958050 361539 339637 566899 98
<599 bytes omitted>

Special Judge 信息

Congratulations! You did right job!

系统信息

Exited with return code 0
测试点 #2
Accepted
得分:100
用时:4 ms
内存:404 KiB

输入文件(2.in

1
3
1 2 3

Special Judge 信息

Congratulations! You did right job!

系统信息

Exited with return code 0
测试点 #3
Accepted
得分:100
用时:656 ms
内存:408 KiB

输入文件(3.in

1
300
743781 147215 632500 733399 151404 855564 158551 538029 58980 958050 361539 339637 566899 98
<1978 bytes omitted>

Special Judge 信息

Congratulations! You did right job!

系统信息

Exited with return code 0