Please sign in first.
Submission #76596865
Source Code Expand
#include <stdio.h>
int main(void)
{
int n, ct=0;
char s[16];
scanf("%d", &n);
for(int i=0; i<n; i++)
{
scanf("%s", s);
if(s[0]=='F') ct++;
}
if(ct<(n+1)/2) printf("No\n");
else printf("Yes\n");
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Majority |
| User | kodukikohaku |
| Language | C23 (GCC 14.2.0) |
| Score | 100 |
| Code Size | 247 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 1692 KiB |
Compile Error
Main.c: In function ‘main’:
Main.c:7:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d", &n);
| ^~~~~~~~~~~~~~~
Main.c:10:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%s", s);
| ^~~~~~~~~~~~~~
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_example_00.txt, 00_example_01.txt, 00_example_02.txt |
| All | 00_example_00.txt, 00_example_01.txt, 00_example_02.txt, 01_max_00.txt, 01_max_01.txt, 02_near_y_00.txt, 02_near_y_01.txt, 02_near_y_02.txt, 03_near_n_00.txt, 03_near_n_01.txt, 03_near_n_02.txt, 04_random_00.txt, 04_random_01.txt, 04_random_02.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_example_00.txt | AC | 1 ms | 1624 KiB |
| 00_example_01.txt | AC | 0 ms | 1592 KiB |
| 00_example_02.txt | AC | 0 ms | 1652 KiB |
| 01_max_00.txt | AC | 0 ms | 1596 KiB |
| 01_max_01.txt | AC | 0 ms | 1692 KiB |
| 02_near_y_00.txt | AC | 0 ms | 1592 KiB |
| 02_near_y_01.txt | AC | 0 ms | 1544 KiB |
| 02_near_y_02.txt | AC | 0 ms | 1552 KiB |
| 03_near_n_00.txt | AC | 0 ms | 1600 KiB |
| 03_near_n_01.txt | AC | 0 ms | 1692 KiB |
| 03_near_n_02.txt | AC | 0 ms | 1544 KiB |
| 04_random_00.txt | AC | 0 ms | 1640 KiB |
| 04_random_01.txt | AC | 0 ms | 1692 KiB |
| 04_random_02.txt | AC | 0 ms | 1588 KiB |