QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#90112#3337. The Nutty ProfessorChatGPTAC ✓12ms3340kbC++522b2023-03-22 13:25:052023-03-22 13:25:08

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-22 13:25:08]
  • 评测
  • 测评结果:AC
  • 用时:12ms
  • 内存:3340kb
  • [2023-03-22 13:25:05]
  • 提交

answer

#include <iostream>

using namespace std;

int main() {
    int t;
    cin >> t;

    while (t--) {
        int d, n, s, p;
        cin >> d >> n >> s >> p;

        int serial_time = n * s;
        int parallel_time = d + n * p;

        if (parallel_time < serial_time) {
            cout << "parallelize\n";
        } else if (serial_time < parallel_time) {
            cout << "do not parallelize\n";
        } else {
            cout << "does not matter\n";
        }
    }

    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 12ms
memory: 3340kb

input:

1000
238925 21100 375 998
131253 55710 693 213
75975 12114 60 316
386960 77155 162 154
266405 31769 860 24
34668 96478 452 869
411504 69937 944 282
10237 42355 11 168
323726 57375 394 181
718989 67287 909 878
781508 59033 951 950
147430 27056 268 53
924951 88071 871 100
88410 16152 85 692
50187 6189...

output:

do not parallelize
parallelize
do not parallelize
parallelize
parallelize
do not parallelize
parallelize
do not parallelize
parallelize
parallelize
do not parallelize
parallelize
parallelize
do not parallelize
do not parallelize
do not parallelize
do not parallelize
do not parallelize
parallelize
do...

result:

ok 1000 lines

Extra Test:

score: 0
Extra Test Passed