Submission #147967

#TimeUsernameProblemLanguageResultExecution timeMemory
147967연구맨 (#201)Get Hundred Points! (FXCUP4_hundred)C++17
Compilation error
0 ms0 KiB
#include "hundred.h" #include <string> using namespace std; int max(int a,int b){ if(a>b)return a; else return b; } std::string GetHundredPoints(int A, int B, int C) { string strA; if (max(A, max(B, C)) == A) { strset(strA, "A", 100); Mark(strA); } else if (max(A, max(B, C)) == B) { strset(strA, "B", 100); Mark(strA); } else if (max(A, max(B, C)) == C) { strset(strA, "C", 100); Mark(strA); } }

Compilation message (stderr)

hundred.cpp: In function 'std::__cxx11::string GetHundredPoints(int, int, int)':
hundred.cpp:11:9: error: 'strset' was not declared in this scope
         strset(strA, "A", 100);
         ^~~~~~
hundred.cpp:11:9: note: suggested alternative: 'tzset'
         strset(strA, "A", 100);
         ^~~~~~
         tzset
hundred.cpp:15:9: error: 'strset' was not declared in this scope
         strset(strA, "B", 100);
         ^~~~~~
hundred.cpp:15:9: note: suggested alternative: 'tzset'
         strset(strA, "B", 100);
         ^~~~~~
         tzset
hundred.cpp:19:9: error: 'strset' was not declared in this scope
         strset(strA, "C", 100);
         ^~~~~~
hundred.cpp:19:9: note: suggested alternative: 'tzset'
         strset(strA, "C", 100);
         ^~~~~~
         tzset
hundred.cpp:22:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^