Problem firstabc
User itsLQ
Submission Time 2023-12-06 09:59:09
Score 0
Max Time N/A
Max Memory N/A

Compile Error

firstabc.cpp: In function ‘int main()’:
firstabc.cpp:8:10: error: ‘INT_MAX’ was not declared in this scope
8 | int a = INT_MAX, b = INT_MAX, c = INT_MAX;
| ^~~~~~~
firstabc.cpp:2:1: note: ‘INT_MAX’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’?
1 | #include <iostream>
+++ |+#include <climits>
2 | #include <string>
firstabc.cpp:11:20: error: ‘b’ was not declared in this scope
11 | if (S[i] == 'b') b = min(b, i);
| ^
firstabc.cpp:12:20: error: ‘c’ was not declared in this scope
12 | if (S[i] == 'c') c = min(c, i);
| ^
firstabc.cpp:14:21: error: ‘b’ was not declared in this scope
14 | cout << max(a, max(b, c));
| ^
firstabc.cpp:14:24: error: ‘c’ was not declared in this scope
14 | cout << max(a, max(b, c));
| ^