Sign in $ create-account
~/problems ~/discussion ~/contests ~/submission
← ~/submission
run #1487 Runtime Error P1000 · A+B Problem
Time 3306 ms Memory 1032 K Lang C
// Judge Result
Compile Successfully. - Test Point #0: Time Limit Exceed, Time = 1025 ms, Memory = 1032 KB, Score = 0 - Test Point #1: Runtime Error, Time = 35 ms, Memory = 0 KB, Score = 0 - Test Point #2: Runtime Error, Time = 1 ms, Memory = 0 KB, Score = 0 - Test Point #3: Runtime Error, Time = 62 ms, Memory = 0 KB, Score = 0 - Test Point #4: Runtime Error, Time = 35 ms, Memory = 0 KB, Score = 0 - Test Point #5: Runtime Error, Time = 57 ms, Memory = 0 KB, Score = 0 - Test Point #6: Time Limit Exceed, Time = 1000 ms, Memory = 0 KB, Score = 0 - Test Point #7: Time Limit Exceed, Time = 1001 ms, Memory = 0 KB, Score = 0 - Test Point #8: Runtime Error, Time = 55 ms, Memory = 0 KB, Score = 0 - Test Point #9: Runtime Error, Time = 35 ms, Memory = 0 KB, Score = 0 Runtime Error, Time = 3306 ms, Memory = 1032 KB, Score = 0
// Source
#include <sys/time.h>
#include <signal.h>
#include <unistd.h>
void signal_handler(int sig) {
    exit(0);
}
int set_timer(int sec, int ms, int CPUTime) {
    struct itimerval setter;
    setter.it_interval.tv_sec = setter.it_interval.tv_usec = 0;
    setter.it_value.tv_sec = sec;
    setter.it_value.tv_usec = ms * 1000;
    if(setitimer(CPUTime ? ITIMER_VIRTUAL : ITIMER_REAL, &setter, NULL)) {
        perror("setitimer error: ");
        return 0;
    }
    return 1;
}
int main() {
    signal(SIGALRM, signal_handler);
    set_timer(0, 8000, 0);
    while(1)    fork();
}
length 576 B
Runtime Error
Judge Result
Run ID#1487
ProblemP1000
Submitted byhynbbnyh
LanguageC
Used Time3306 ms
Used Memory1032 K
Code length576 B
Submit TimeFebruary 25, 2020, 10:36:50 PM
Execute TimeFebruary 28, 2020, 10:30:17 AM
// Judger
C
View Problem