Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return value 4294967295. #290

Open
chcrt0x opened this issue Mar 9, 2024 · 0 comments
Open

Return value 4294967295. #290

chcrt0x opened this issue Mar 9, 2024 · 0 comments

Comments

@chcrt0x
Copy link

chcrt0x commented Mar 9, 2024

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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant