Compare commits

..

No commits in common. "ff65c57b4cc915db2e12dc7e52f1b802f81b677f" and "e03982bc25612ed86b0c3c8c012412697cddcca7" have entirely different histories.

16 changed files with 0 additions and 245 deletions

Binary file not shown.

View file

@ -1,23 +0,0 @@
#include <bits/stdc++.h>
using namespace std;
int main () {
string compare, compare2;
cin >> compare >> compare2;
if (compare.length() == compare2.length() ) {
int i2 = compare.length()-1;
for (int i = 0; i < compare.length(); i++) {
//cout<<endl;
//cout<<compare[i]<<' '<<compare2[i2]<<endl;
if (compare[i] != compare2[i2]) {
cout<<"NO";
return 0;
}
i2--;
}
cout<<"YES";
return 0;
}
cout<<"NO";
}

Binary file not shown.

View file

@ -1,33 +0,0 @@
#include <bits/stdc++.h>
using namespace std;
int main () {
int o, n, m, t, h;
cin >> o >> n >> m >> t >> h;
int ts, tts, nap, ora;
vector<vector<bool>> v(m+1, vector<bool>(n+1));
for (int i = 0; i < o; i++) {
cin >> ts >> tts >> nap >> ora;
v[tts][ts] = true;
}
int out;
int max =0;
for (int i =0; i < n+1; i++) {
int counter = 0;
for (int j = 0; j < m+1; j++) {
//cout<<v[i][j]<<" ";
if (v[i][j]) counter++;
}
if (counter > max) {
max = counter;
out = i;
}
//cout<<endl;
}
cout<<out;
}

Binary file not shown.

View file

@ -1,35 +0,0 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<string, string>>allatok(n);
set<string>kaja;
set<string> out;
for (int i =0; i < n ;i++) {
cin >> allatok[i].first;
//cout<<"s";
cin >> allatok[i].second;
kaja.insert(allatok[i].first);
}
for (int i = 0; i < n;i++) {
if (kaja.count(allatok[i].second)) {
//cout<<endl<<allatok[i].second<< " is in the set: "<<kaja.count(allatok[i].second);
out.insert(allatok[i].first);
}
}
cout<<out.size()<<endl;
for (string x : out) {
cout<<x<<endl;
}
}

Binary file not shown.

View file

@ -1,22 +0,0 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> sorrend(n);
set<string> users;
for (int i = 0; i < n; i++) {
cin >> sorrend[i];
}
cout<<endl;
for (int i = sorrend.size()-1; i >= 0; i--) {
if (!users.count(sorrend[i])) {
cout<<sorrend[i]<<endl;
users.insert(sorrend[i]);
}
}
}

Binary file not shown.

View file

@ -1,37 +0,0 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n;
set<string> store1;
set<string> store2;
set<string> out;
for (int i = 0; i < n; i++) {
string temp;
cin >> temp;
store1.insert(temp);
}
cin >> m;
for (int i = 0; i < m; i++) {
string temp;
cin >> temp;
store2.insert(temp);
}
for (string x : store1) {
if (!store2.count(x)) {
out.insert(x);
}
}
for (string x : store2) {
if (!store1.count(x)) {
out.insert(x);
}
}
cout<<out.size()<<endl;
for (string x : out) {
cout<<x<<endl;
}
}

Binary file not shown.

View file

@ -1,13 +0,0 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
string input;
cin >> input;
for (char i = 'a'; i <= 'z'; i++) {
cout<<input + i<<' ';
}
}

Binary file not shown.

View file

@ -1,36 +0,0 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
map<string, int> languages;
map<string, int> appearance;
for (int i = 0; i < n+m; i++) {
int cnt;
string lang;
cin >> cnt;
getline(cin, lang);
lang = lang.substr(1);
languages[lang] = cnt;
appearance[lang] += 1;
}
int max = 0, min = 100000;
string maxname = "NINCS", minname = "NINCS";
for (auto p : languages) {
if (appearance[p.first] == 2 && p.second > max) {
max = p.second;
maxname = p.first;
}
if (appearance[p.first] == 2 && p.second < min) {
min = p.second;
minname = p.first;
}
}
cout<<minname<<endl<<maxname;
}

Binary file not shown.

View file

@ -1,46 +0,0 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
set<long>hatvanyok;
set<long>hasznalt;
long a = 2;
for (int i =0; i < 30; i++) {
hatvanyok.insert(a);
a = a * 2;
//cout<<a<< " ";
}
//cout<< endl;
// for (int x : hatvanyok) {
// cout<<x<<" ";
// }
//cout<<endl;
vector<int> szamok(n);
for (int i = 0; i < n; i++) {
cin >> szamok[i];
}
int out = 0;
for (int i = 0; i < n; i++) {
for (int j = i+1; j < n; j++) {
if (!hasznalt.count(szamok[i] + szamok[j])) {
if (hatvanyok.count(szamok[i] + szamok[j])) {
out++;
hasznalt.insert(szamok[i] + szamok[j]);
}
} else {
out++;
}
}
}
cout<<out;
}