Submission #3783946
Source Code Expand
#include<cstdio> #include<iostream> #include<algorithm> using namespace std; char ss[108],c; int n,num,ans; long long read() { long long x=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x*f; } int main() { scanf("%s",&ss); n=read(); for(int i=1;i<=n;++i) { num++; scanf("%c",&c); if(c=='.') { num=0; continue; } if(num==3) { ans++; num=0; } } scanf("%s",&ss); printf("%d",ans); return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - 雨上がり |
User | luogu_bot5 |
Language | C++ (GCC 5.4.1) |
Score | 0 |
Code Size | 558 Byte |
Status | TLE |
Exec Time | 2103 ms |
Memory | 256 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:17:16: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘char (*)[108]’ [-Wformat=] scanf("%s",&ss); ^ ./Main.cpp:34:16: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘char (*)[108]’ [-Wformat=] scanf("%s",&ss); ^ ./Main.cpp:17:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%s",&ss); ^ ./Main.cpp:22:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%c",&c); ^ ./Main.cpp:34:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%s",&ss); ^
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 0 / 50 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | case_000.txt, case_001.txt, case_002.txt, case_003.txt, case_004.txt, case_005.txt, case_006.txt, case_007.txt, case_008.txt, case_009.txt, case_010.txt, case_011.txt, case_012.txt, case_013.txt, case_014.txt, case_015.txt, case_016.txt, case_017.txt, case_018.txt, case_019.txt, case_020.txt, case_021.txt, case_022.txt, case_023.txt, case_024.txt, case_025.txt, case_026.txt, case_027.txt, case_028.txt, case_029.txt, case_030.txt, case_031.txt, case_032.txt, case_033.txt, case_034.txt, case_035.txt, case_036.txt, case_037.txt, case_038.txt, case_039.txt, case_040.txt, case_041.txt, case_042.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
case_000.txt | TLE | 2103 ms | 256 KB |
case_001.txt | TLE | 2103 ms | 256 KB |
case_002.txt | TLE | 2103 ms | 256 KB |
case_003.txt | TLE | 2103 ms | 256 KB |
case_004.txt | TLE | 2103 ms | 256 KB |
case_005.txt | TLE | 2103 ms | 256 KB |
case_006.txt | TLE | 2103 ms | 256 KB |
case_007.txt | TLE | 2103 ms | 256 KB |
case_008.txt | TLE | 2103 ms | 256 KB |
case_009.txt | TLE | 2103 ms | 256 KB |
case_010.txt | TLE | 2103 ms | 256 KB |
case_011.txt | TLE | 2103 ms | 256 KB |
case_012.txt | TLE | 2103 ms | 256 KB |
case_013.txt | TLE | 2103 ms | 256 KB |
case_014.txt | TLE | 2103 ms | 256 KB |
case_015.txt | TLE | 2103 ms | 256 KB |
case_016.txt | TLE | 2103 ms | 256 KB |
case_017.txt | TLE | 2103 ms | 256 KB |
case_018.txt | TLE | 2103 ms | 256 KB |
case_019.txt | TLE | 2103 ms | 256 KB |
case_020.txt | TLE | 2103 ms | 256 KB |
case_021.txt | TLE | 2103 ms | 256 KB |
case_022.txt | TLE | 2103 ms | 256 KB |
case_023.txt | TLE | 2103 ms | 256 KB |
case_024.txt | TLE | 2103 ms | 256 KB |
case_025.txt | TLE | 2103 ms | 256 KB |
case_026.txt | TLE | 2103 ms | 256 KB |
case_027.txt | TLE | 2103 ms | 256 KB |
case_028.txt | TLE | 2103 ms | 256 KB |
case_029.txt | TLE | 2103 ms | 256 KB |
case_030.txt | TLE | 2103 ms | 256 KB |
case_031.txt | TLE | 2103 ms | 256 KB |
case_032.txt | TLE | 2103 ms | 256 KB |
case_033.txt | TLE | 2103 ms | 256 KB |
case_034.txt | TLE | 2103 ms | 256 KB |
case_035.txt | TLE | 2103 ms | 256 KB |
case_036.txt | TLE | 2103 ms | 256 KB |
case_037.txt | TLE | 2103 ms | 256 KB |
case_038.txt | TLE | 2103 ms | 256 KB |
case_039.txt | TLE | 2103 ms | 256 KB |
case_040.txt | TLE | 2103 ms | 256 KB |
case_041.txt | TLE | 2103 ms | 256 KB |
case_042.txt | TLE | 2103 ms | 256 KB |