/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 0ms 324.0 KiB
#2 Accepted 0ms 284.0 KiB
#3 Accepted 0ms 284.0 KiB
#4 Accepted 0ms 284.0 KiB

Code

#include <stdio.h>
#include <string.h>

int main() {
    int n;
    scanf("%d",&n);
    char guest[n][50];
    
    for(int i=0; i<n; i++){
        scanf("%s",guest[i]);
        guest[i][48] = '0';
    }
    int m;
    scanf("%d",&m);
    char arrive[50];
    for(int j=0; j<m; j++){
        scanf("%s",arrive);
        int found = 0;
        for(int i=0; i<n; i++){
            if(strcmp(arrive,guest[i])==0){
                if(guest[i][48]=='1') printf("Already inside!\n");
                else if(guest[i][48]=='0') {
                    printf("Welcome!\n");
                    guest[i][48] = '1';
                }
                found = 1;
                break;
            }
        }
        if(!found) printf("Sorry, not on the list.\n");
    }
    
    
    
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1227 LUCC Party Check-in
Contest
LUCC Presents Intra LU Junior Programming Contest - Replay
Language
C99 (GCC 13.2.0)
Submit At
2025-09-02 16:04:32
Judged At
2025-09-02 16:04:32
Judged By
Score
100
Total Time
0ms
Peak Memory
324.0 KiB