编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#20193 #5. 慢速排序/交互题测试 Accepted 100 3313 ms 63896 K Java / 861 B 192023211979 2024-12-09 16:30:25
显示原始代码
import java.util.Scanner;

public class sortedDemo {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        int n = sc.nextInt();
        int x, y;
        while (t-- > 0) {
            for (int i = 0; i < n - 1; i++) {
                x = i + 1;
                for (int j = 1; j < n - i; j++) {
                    y = x + j;
                    System.out.println("c " + x + " " + y);
                    System.out.flush();
                    char r = sc.next().charAt(0);
                    if (r == '>') {
                        System.out.println("s " + x + " " + y);
                        System.out.flush();
                    }
                }
            }
            System.out.println("e");
            System.out.flush();
        }
    }
}
子任务 #1
Accepted
得分:100
测试点 #1
Accepted
得分:100
用时:812 ms
内存:32596 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!
测试点 #2
Accepted
得分:100
用时:200 ms
内存:15612 KiB

输入文件(2.in

1
3
1 2 3

Special Judge 信息

Congratulations! You did right job!

系统信息

Exited with return code 0
测试点 #3
Accepted
得分:100
用时:2301 ms
内存:63896 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!