제출 #1010630

#제출 시각아이디문제언어결과실행 시간메모리
1010630lrancic거래 (IZhO13_trading)C++17
0 / 100
2040 ms4708 KiB
#include <iostream> #include <vector> int main() { int n, m; std::cin >> n >> m; std::vector<int> prices(n+1); for (int i = 0; i < m; i++) { int l, r, x; std::cin >> l >> r >> x; for (; l <= r; l++, x++) prices[l] = std::max(prices[l], x); } for (int i = 1; i <= n; i++) std::cout << prices[i] << ' '; std::cout << '\n'; }

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

trading.cpp: In function 'int main()':
trading.cpp:12:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   12 |  for (int i = 1; i <= n; i++) std::cout << prices[i] << ' '; std::cout << '\n';
      |  ^~~
trading.cpp:12:62: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   12 |  for (int i = 1; i <= n; i++) std::cout << prices[i] << ' '; std::cout << '\n';
      |                                                              ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...