Submission #910194

#TimeUsernameProblemLanguageResultExecution timeMemory
910194ByeWorldTracks in the Snow (BOI13_tracks)C++14
0 / 100
51 ms860 KiB
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,unroll-loops")
#define bupol __builtin_popcount
//#define int long long 
#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define lf (id<<1)
#define rg ((id<<1)|1)
#define md ((l+r)>>1)
using namespace std;
const int MAXN = 2e5+5;
const int MAXK = 205;
const int LOG = 20;
const int MOD = 1e9+7;
const int SQRT = 520;
const int INF = 1e9+10;
typedef pair<ll,ll> pii;
typedef pair<ll,pii> ipii;

int h, w;
char s[410][410];

signed main(){
    //ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    cin >> h >> w;
    for(int i=0; i<h; i++){
        for(int j=0; j<w; j++) cin >> s[i][j];
    }

    int ans = 0; set<char> x; 
    for(int i=0; i<h; i++){
        for(int j=0; j<w; j++){
            if(s[i][j]=='.') continue;
            x.insert(s[i][j]);
        }
    }
    cout << x.size() << '\n';
}

Compilation message (stderr)

tracks.cpp: In function 'int main()':
tracks.cpp:33:9: warning: unused variable 'ans' [-Wunused-variable]
   33 |     int ans = 0; set<char> x;
      |         ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...