CoolFace
Datasetpublic

hackercupai/hackercup

Data Preview The data available in this preview contains a 10 row dataset: Sample Dataset ("sample"): This is a subset of the full dataset, containing data from 2023. To view full dataset, download output_dataset.parquet. This contains data from 2011 to 2023. Fields The dataset include the following fields: name (string) year (string) round (string) statement (string) input (string) solution (string) code (string) sample_input (string) sample_output (string)… See the full description on the dataset page: https://huggingface.co/datasets/hackercupai/hackercup.

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
24likes2.2kdownloads
second_friend.cpp37 linesDownload Raw Back to quals
1#include <iostream>2using namespace std;3 4const int LIM = 105;5 6int R, C;7char G[LIM][LIM];8 9void solve() {10  bool empty = true;11  cin >> R >> C;12  for (int i = 0; i < R; i++) {13    for (int j = 0; j < C; j++) {14      cin >> G[i][j];15      empty = empty && G[i][j] == '.';16    }17  }18  if (!empty && (R < 2 || C < 2)) {19    cout << "Impossible" << endl;20    return;21  }22  cout << "Possible" << endl;23  for (int i = 0; i < R; i++) {24    cout << string(C, empty ? '.' : '^') << endl;25  }26}27 28int main() {29  int T;30  cin >> T;31  for (int t = 1; t <= T; t++) {32    cout << "Case #" << t << ": ";33    solve();34  }35  return 0;36}37