Open chcrt0x opened 8 months ago
When I compile a program using this code, I return value 4294967295 when I run it, but it can run normally in other OJ compilers.
System: Windows 7 Version: Dev C++ 6.3
C++ Code
#import "bits/stdc++.h" #define ll long long #define endl '\n' using namespace std; map<string, set<string>> tagToMovies; map<string, set<string>> movieToTags; int n, k; string movieName, tag; int main() { freopen("tag.in", "r", stdin); freopen("tag.out", "w", stdout); ios::sync_with_stdio(false); cin.tie(nullptr); cin >> n; for (int i = 0; i < n; ++i) { cin >> movieName >> k; for (int j = 0; j < k; ++j) { cin >> tag; tagToMovies[tag].insert(movieName); movieToTags[movieName].insert(tag); } } cout << tagToMovies.size() << endl; for (const auto& tag : tagToMovies) { cout << tag.first << " " << tag.second.size(); for (const auto& movie : tag.second) { cout << " " << movie; } cout << endl; } fclose(stdin); fclose(stdout); return 0; }
When I compile a program using this code, I return value 4294967295 when I run it, but it can run normally in other OJ compilers.
System: Windows 7 Version: Dev C++ 6.3
C++ Code