제출 #1260411

#제출 시각아이디문제언어결과실행 시간메모리
1260411kargneqType Printer (IOI08_printer)C++20
0 / 100
20 ms1720 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n; scanf("%d", &n); vector<string> words(n); for (int i = 0; i < n; i++) cin >> words[i]; sort(words.begin(), words.end()); string current_word = ""; for (int i = 0; i < n; i++) { while (current_word != "" and current_word != words[i].substr(0, current_word.size())) { current_word.pop_back(); printf("-\n"); } while (current_word != words[i]) { current_word.push_back(words[i][current_word.size()]); cout << words[i][current_word.size() - 1] << "\n"; } } return 0; }

컴파일 시 표준 에러 (stderr) 메시지

printer.cpp: In function 'int main()':
printer.cpp:6:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    6 |         scanf("%d", &n);
      |         ~~~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...