Submission #210325

# Submission time Handle Problem Language Result Execution time Memory
210325 2020-03-17T04:38:56 Z aloomya Emacs (COCI20_emacs) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>                                                                                                                                              using namespace std;                                                                                                                                                  #define int long long                                                                                                                                                 #define pb push_back                                                                                                                                                  #define pf push_front                                                                                                                                                 #define pob pop_back                                                                                                                                                  #define pof pop_front                                                                                                                                                 #define F first                                                                                                                                                       #define S second                                                                                                                                                      typedef pair<int, int> PII;                                                                                                                                           const int KMX = 1e2 + 10, MOD = 1e9 + 7, inf = 3e18, ninf = -3e18;                                                                                                                                                                                                                                                                          string  s[KMX];                                                                                                                                                       int32_t main(){                                                                                                                                                           ios_base::sync_with_stdio(false);                                                                                                                                     cin.tie();                                                                                                                                                            int n, m;                                                                                                                                                             cin >> n >> m;                                                                                                                                                        for(int i = 0; i < n; i++){                                                                                                                                               cin >> s[i];                                                                                                                                                      }                                                                                                                                                                     int ans = 0;                                                                                                                                                          for(int i = 0; i < n; i++){                                                                                                                                               for(int j = 0; j < m ; j++){                                                                                                                                              bool tf = (s[i][j] == '*');                                                                                                                                           tf &= (j ? s[i][j - 1] == '.' : 1);                                                                                                                                   tf &= (i ? s[i - 1][j] == '.' : 1);                                                                                                                                   if(tf)                                                                                                                                                                    ans++;                                                                                                                                                        }                                                                                                                                                                 }                                                                                                                                                                     cout << ans << endl;                                                                                                                                              } 

Compilation message

emacs.cpp:1:167: warning: extra tokens at end of #include directive
 #include <bits/stdc++.h>                                                                                                                                              using namespace std;                                                                                                                                                  #define int long long                                                                                                                                                 #define pb push_back                                                                                                                                                  #define pf push_front                                                                                                                                                 #define pob pop_back                                                                                                                                                  #define pof pop_front                                                                                                                                                 #define F first                                                                                                                                                       #define S second                                                                                                                                                      typedef pair<int, int> PII;                                                                                                                                           const int KMX = 1e2 + 10, MOD = 1e9 + 7, inf = 3e18, ninf = -3e18;                                                                                                                                                                                                                                                                          string  s[KMX];                                                                                                                                                       int32_t main(){                                                                                                                                                           ios_base::sync_with_stdio(false);                                                                                                                                     cin.tie();                                                                                                                                                            int n, m;                                                                                                                                                             cin >> n >> m;                                                                                                                                                        for(int i = 0; i < n; i++){                                                                                                                                               cin >> s[i];                                                                                                                                                      }                                                                                                                                                                     int ans = 0;                                                                                                                                                          for(int i = 0; i < n; i++){                                                                                                                                               for(int j = 0; j < m ; j++){                                                                                                                                              bool tf = (s[i][j] == '*');                                                                                                                                           tf &= (j ? s[i][j - 1] == '.' : 1);                                                                                                                                   tf &= (i ? s[i - 1][j] == '.' : 1);                                                                                                                                   if(tf)                                                                                                                                                                    ans++;                                                                                                                                                        }                                                                                                                                                                 }                                                                                                                                                                     cout << ans << endl;                                                                                                                                              }
                                                                                                                                                                       ^~~~~
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status