Submission #2858634
Source Code Expand
#include <iostream> #include <string> #include <cstring> #include <iomanip> #include <cmath> #include <cstdlib> #include <cstdio> #include <algorithm> #include <map> #include <queue> #include <vector> #include <set> #include <stack> using namespace std; #define ll long long #define maxn 200005 #define angel 0x3f3f3f3f #define eps 1e-9 #define my_angel main #define ull unsigned long long char str[30]; int my_angel() { scanf("%s",str+1); int sum=0; for(int i=1;i<=4;i++) { if(str[i]=='+') sum++; else sum--; } printf("%d\n",sum); return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Eating Symbols Easy |
User | vjudge2 |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 612 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 256 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:24:22: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%s",str+1); ^
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt, sample3.txt |
All | sample1.txt, sample2.txt, sample3.txt, 1.txt, 2.txt, 3.txt, 4.txt, 5.txt, sample1.txt, sample2.txt, sample3.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
1.txt | AC | 1 ms | 256 KB |
2.txt | AC | 1 ms | 256 KB |
3.txt | AC | 1 ms | 256 KB |
4.txt | AC | 1 ms | 256 KB |
5.txt | AC | 1 ms | 256 KB |
sample1.txt | AC | 1 ms | 256 KB |
sample2.txt | AC | 1 ms | 256 KB |
sample3.txt | AC | 1 ms | 256 KB |