제출 #661095

#제출 시각아이디문제언어결과실행 시간메모리
661095Trisanu_DasTavan (COCI16_tavan)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;

int main(){
  int n, m, k, x; string s; cin >> n >> m >> k >> x >> s;
  x--;
  string checks[m];
  vector<int> anss;
  for (int i = 0; i < m; i++) {
		cin >> checks[i]; sort(checks[i].begin(), checks[i].end());
		anss.push_back(x % k); x /= k;
	}
	reverse(d.begin(), d.end());
	int cnt = 0;
	for (int i = 0; i < n; i++) if (s[i] == '#') s[i] = checks[cnt][d[cnt]], seen++;
	cout << s << '\n';
}

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

tavan.cpp: In function 'int main()':
tavan.cpp:13:10: error: 'd' was not declared in this scope
   13 |  reverse(d.begin(), d.end());
      |          ^
tavan.cpp:15:75: error: 'seen' was not declared in this scope
   15 |  for (int i = 0; i < n; i++) if (s[i] == '#') s[i] = checks[cnt][d[cnt]], seen++;
      |                                                                           ^~~~