QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#705157#3337. The Nutty ProfessorTheZoneAC ✓2ms3608kbC++14508b2024-11-02 22:20:142024-11-02 22:20:15

Judging History

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

  • [2024-11-02 22:20:15]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3608kb
  • [2024-11-02 22:20:14]
  • 提交

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;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3608kb

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