Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: mameeewin

Problemset: ตัวอักษรตัวแรกในคำ

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-13 14:28:37

#include <iostream>
#include <unordered_map>
using namespace std;

int main(){
  string s; cin >> s;
  unordered_map<char, int> check;
  for (char i: s) check[i]++;
  for (char i: "ABCDEFGHIJKLMNOPQRSTUVWXYZ"){
    if (check[i]==1){
      cout << i;
      return 0;
    }
  }
}

/*
TEST
1. Given Testcases
2. Minimum
3. Maximum
4. Duplicates
5. Negative Numbers / Zero

CHECK
1. Indexing Error/Wrong Variable
2. Division/Modulo by Zero
3. Overflow/Constraints
4. Leftover Debugging Output
5. Filename
*/