Search is not available for this dataset
name
stringlengths
2
88
description
stringlengths
31
8.62k
public_tests
dict
private_tests
dict
solution_type
stringclasses
2 values
programming_language
stringclasses
5 values
solution
stringlengths
1
983k
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { for (;;) { string s; for (;;) { string tmp; getline(cin, tmp); if (tmp == "") break; s += tmp; } int n = s.size(); string key; getline(cin, key); int m = key.size(); vector<bool> isKey(256, false); f...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; string S, K; const int INF = 1 << 28; void solve() { string ans; int len = INF, cnt = 0; int left = INF; int idx[K.length()]; for (int i = 0; i < K.length(); ++i) idx[i] = -1; for (int p = 0; p < S.length(); ++p) { for (int k = 0; k < K.length(); ++k) { ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; char chs[1001]; int main() { bool fi = false; string str; while (getline(cin, str) && str != "") { if (fi) cout << endl; else fi = true; string tmp; while (getline(cin, tmp) && tmp != "") str += tmp; memset(chs, 0, sizeof(chs)); str...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; bool check(int begin, int end, vector<vector<int> > &ind) { if (begin > end) return false; for (int i = 0; i < (int)ind.size(); ++i) { if (ind[i].size() == 0) return false; vector<int>::iterator it_b = lower_bound(ind[i].begin(), ind[i].end(), begin); ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; bool notfirst; const int size = 51; int cnt[size]; int ksize; bool check() { for (int i = 0; i < ksize; i++) { if (cnt[i] == 0) return false; } return true; } int contain(string& K, char c) { for (int i = 0; i < ksize; i++) { if (c == K[i]) return i; } r...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.*; import java.lang.*; import java.math.*; import java.io.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class Main{ Scanner sc=new Scanner(System.in); int INF=1<<28; double EPS=1e-9; char[] s, key; void run(){ for(;;){ String lines=""; for(;;){ Strin...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.*; import java.lang.*; import java.math.*; import java.io.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class Main{ Scanner sc=new Scanner(System.in); int INF=1<<28; double EPS=1e-9; char[] s, key; void run(){ for(;;){ StringBuffer lines=new StringBuffer(""...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); constexpr int NUM = 128; constexpr int WIDTH = 72; bool first = true; string line; while (getline(cin, line)) { if (first) first = false; else cout << endl; string text = ""; ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.*; import java.lang.*; import java.math.*; import java.io.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class Main{ Scanner sc=new Scanner(System.in); int INF=1<<28; double EPS=1e-9; char[] s, key; void run(){ for(;;){ StringBuffer lines=new StringBuffer();...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int h = 0, i; string s; while (getline(cin, s)) { string t = s; while (getline(cin, s) && s != "") t += s; string u; getline(cin, u); getline(cin, s); char z[256]; memset(z, 0, sizeof(z)); int uln = u.length(); for (i =...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string str; bool first = true; while (getline(cin, str)) { string s = str; string minSizeStr; while (getline(cin, str), str != "") s += str; int cnt = 0; string key; getline(cin, key); getline(cin, str); if (key.size() == 1...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; bool notfirst; const int size = 51; int cnt[size]; int ksize; bool check() { for (int i = 0; i < ksize; i++) { if (cnt[i] == 0) return false; } return true; } int contain(string& K, char c) { for (int i = 0; i < ksize; i++) { if (c == K[i]) return i; } r...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int MAX = 51; string text, key; map<char, int> M; int numKey[MAX]; bool input() { text = ""; string s = ""; if (!getline(cin, s)) return false; if (s == "") return false; text = s; while (getline(cin, s) && s != "") text += s; getline(cin, s); key = s;...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; bool notfirst; const int size = 51; int cnt[size]; int ksize; bool check() { for (int i = 0; i < ksize; i++) { if (cnt[i] == 0) return false; } return true; } int contain(string& K, char c) { for (int i = 0; i < ksize; i++) { if (c == K[i]) return i; } r...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { bool first = true; for (;;) { string s; for (;;) { string tmp; getline(cin, tmp); if (tmp == "") break; s += tmp; } int n = s.size(); if (n == 0) return 0; if (first) first = false; else cout <...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main(void) { string s, t, in; bool f = false; while (true) { s.clear(); t.clear(); while (true) { getline(cin, in); if (in.size() == 0) break; s += in; } while (true) { getline(cin, in); if (in.size() == 0) break; ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.*; import java.lang.*; import java.math.*; import java.io.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class Main{ Scanner sc=new Scanner(System.in); int INF=1<<28; double EPS=1e-9; String s, key; void run(){ for(;;){ s=""; for(;;){ String line=sc.n...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string buf; while (getline(cin, buf), buf != "") { string s = buf; while (getline(cin, buf), buf != "") s += buf; string a; getline(cin, a); int n = a.size(); vector<int> pos[n]; for (int i = 0; i < (int)s.size(); i++) for ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string str; bool first = true; while (getline(cin, str)) { if (!first) cout << endl; string s = str; string minSizeStr; while (getline(cin, str), str != "") s += str; int cnt = 0; string key; getline(cin, key); getline(cin,...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string str, pat; vector<char> num; str.reserve(1000001); num.reserve(1000001); pat.reserve(73); ios::sync_with_stdio(false); cin.tie(0); while (true) { str.clear(); pat.clear(); while (true) { getline(cin, pat); if (pat.e...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; bool notfirst; const int size = 51; int cnt[size]; int ksize; bool check() { for (int i = 0; i < ksize; i++) { if (cnt[i] == 0) return false; } return true; } int contain(string& K, char c) { for (int i = 0; i < ksize; i++) { if (c == K[i]) return i; } r...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string str, pat; vector<char> num; str.reserve(1000001); num.reserve(1000001); pat.reserve(73); ios::sync_with_stdio(false); cin.tie(0); while (true) { str.clear(); while (true) { getline(cin, pat); if (pat.empty() || !cin) b...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int valid[256]; int cnt[256]; int kind; void add(char c) { if (!valid[c]) return; if (cnt[c]++) return; ++kind; } void sub(char c) { if (!valid[c]) return; if (--cnt[c]) return; --kind; } int main() { string in, str, key; while (getline(cin, in)) { str =...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.Arrays; import java.util.Scanner; public class Main { static Scanner sc = new Scanner(System.in); static int[] key = new int[256]; public static void main(String[] args) { while (true) { StringBuilder sb = new StringBuilder(); while (true) { String line = sc.nextLine(); if (line.i...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string str, pat; vector<char> num; str.reserve(1000001); num.reserve(1000001); pat.reserve(73); ios::sync_with_stdio(false); cin.tie(0); string split; while (true) { str.clear(); while (true) { getline(cin, pat); if (pat.em...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string str; bool first = true; while (getline(cin, str)) { string s = str; string minSizeStr; while (getline(cin, str), str != "") s += str; long long cnt = 0; string key; getline(cin, key); getline(cin, str); if (key.size(...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; bool notfirst; const int size = 51; int cnt[size]; int ksize; bool check() { for (int i = 0; i < ksize; i++) { if (cnt[i] == 0) return false; } return true; } int contain(string& K, char c) { for (int i = 0; i < ksize; i++) { if (c == K[i]) return i; } r...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; static const double EPS = 1e-8; string gText; string gQuery; vector<int> gIndex[1024]; class State { public: int _min_pos; int _max_pos; int _query_i; State(int min_pos, int max_pos, int query_i) : _min_pos(min_pos), _max_pos(max_pos), _query_i(query_i) {} ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; static const double EPS = 1e-8; string gText; string gQuery; vector<int> gIndex[256]; class State { public: int _min_pos; int _max_pos; int _query_i; State(int min_pos, int max_pos, int query_i) : _min_pos(min_pos), _max_pos(max_pos), _query_i(query_i) {} b...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string str, pat; vector<char> num; str.reserve(1000001); num.reserve(1000001); pat.reserve(73); ios::sync_with_stdio(false); cin.tie(0); string split; while (true) { str.clear(); pat.clear(); while (true) { getline(cin, pat);...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; char str[1010000]; char in[100]; int v[300]; int w[300]; int main() { bool sec = false; while (1) { int n = 0; bool last = true; int ns = 0; while (1) { gets(in); if (in[0] == 0) break; ns++; for (int i = 0; in[i]; i++) { ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; string S, K; const int n = 1 << 8; int getlen() { int mx[n], res = 1e9; memset(mx, -1, sizeof(mx)); for (int i = 0; i < S.size(); i++) { int ch = S[i]; mx[ch] = max(mx[ch], i); int c = 0, l = 1e9; for (int j = 0; j < K.size(); j++) c += mx[K[j]] >= 0, ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int MAX = 51; string text, key; map<char, int> M; int numKey[MAX]; bool input() { text = ""; string s; getline(cin, s); if (s == "") return false; text = s; while (getline(cin, s) && s != "") text += s; getline(cin, s); key = s; getline(cin, s); re...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string str, pat; vector<char> num; str.reserve(1000001); num.reserve(1000001); pat.reserve(73); ios::sync_with_stdio(false); cin.tie(0); string split; while (true) { str.clear(); while (true) { getline(cin, pat); if (pat.em...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int INF = 1000000000; char chs[1001]; int main() { bool fi = false; string str; while (getline(cin, str) && str != "") { memset(chs, 0, sizeof(chs)); string ss; string tmp; if (fi) cout << endl; else fi = true; while (getline(...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> char s[1000000 + 1]; char sc[50 + 1]; char *find; int minret; char *find11; char aaa[1000]; char bbb[1000]; void print_find() { int i; for (i = 0; i <= minret; i++) printf("%c", find[i]); printf("\n"); } int my_strstr(char *s1, char *s2) { int mincnt, ret, cnt, i; extern int my_strstr...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; bool notfirst; const int size = 51; int cnt[size]; int ksize; bool check() { for (int i = 0; i < ksize; i++) { if (cnt[i] == 0) return false; } return true; } int contain(string& K, char c) { for (int i = 0; i < ksize; i++) { if (c == K[i]) return i; } r...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { while (true) { stringstream ss; string tmp; if (!getline(cin, tmp)) break; ss << tmp; while (true) { getline(cin, tmp); if (tmp == "") break; ss << tmp; } string str = ss.str(); string key; getline(cin, ke...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { bool fst = true; string s; while (getline(cin, s)) { string str(s), sb; while (getline(cin, s)) { if (s.size() == 0) break; str += s; } getline(cin, sb); getline(cin, s); int ansl = (1 << 24), ret = 0; string ans; ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; void compute(string text, string S) { int nt = text.size(), nS = S.size(); int mlen = (1 << 29); string ans = ""; set<string> all; bool found[nS]; int fpos[nS]; for (int i = 0; i < nS; i++) found[i] = false; for (int i = 0; i < nt; i++) { int cnt = 0, mn...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; bool T[256]; int P[256]; vector<string> compute(string text, string key) { vector<string> ans; int k = key.size(); for (int i = 0; i < (int)256; i++) P[i] = -1; int l = text.size(); int r = -1; for (int i = 0; i < (int)256; i++) T[i] = false; for (int i = 0; i...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string str; bool first = true; while (getline(cin, str)) { string s = str; string minSizeStr; while (getline(cin, str), str != "") s += str; long long cnt = 0; string key; getline(cin, key); getline(cin, str); if (key.size(...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; void compute(string text, string S) { int nt = text.size(), nS = S.size(); int mlen = (1 << 29); string ans; set<string> all; bool found[nS]; int fpos[nS]; for (int i = 0; i < nS; i++) found[i] = false; for (int i = 0; i < nt; i++) { int cnt = 0, mn, mx;...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include<iostream> #include<string> #include<vector> using namespace std; #define rep(i, n) for ( int i = 0; i < (int)n; i++) bool T[255]; int P[255]; vector<string> compute(string text, string key){ vector<string> ans; int k = key.size(); rep(i, 255) P[i] = -1; int l = text.size(); int r = -1; ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; char chs[1001]; int main() { bool fi = false; string str; while (getline(cin, str)) { if (fi) cout << endl; else fi = true; string tmp; while (getline(cin, tmp) && tmp != "") str += tmp; memset(chs, 0, sizeof(chs)); string emp; ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; bool T[255]; int P[255]; vector<string> compute(string text, string key) { vector<string> ans; int k = key.size(); for (int i = 0; i < (int)255; i++) P[i] = -1; int l = text.size(); int r = -1; for (int i = 0; i < (int)255; i++) T[i] = false; for (int i = 0; i...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string in; string key; int size; vector<int> pos; int find[50]; int npos; while (cin >> in >> key) { continue; int l = 0, u = 0; size = 10000000; npos = 0; for (int i = 0; i < key.size(); i++) find[i] = 0; pos.clear(); ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; char chs[1001]; int main() { bool fi = false; string str; while (getline(cin, str) && str != "") { if (fi) { cout << endl; cout << endl; } else fi = true; string tmp; while (getline(cin, tmp) && tmp != "") str += tmp; memset(chs, ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; char chs[1001]; int main() { string str; while (getline(cin, str)) { string tmp; while (getline(cin, tmp) && tmp != "") str += tmp; memset(chs, 0, sizeof(chs)); string emp; string ss; getline(cin, ss); if (ss.size() == 1) { int cnt = 0;...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int MAX = 51; string text, key; map<char, int> M; int numKey[MAX]; bool input() { text = ""; string s; getline(cin, s); if (s == "") return false; text = s; while (getline(cin, s) && s != "") text += s; getline(cin, s); key = s; getline(cin, s); re...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; bool notfirst; const int size = 51; int cnt[size]; int ksize; bool check() { for (int i = 0; i < ksize; i++) { if (cnt[i] == 0) return false; } return true; } int contain(string& K, char c) { for (int i = 0; i < ksize; i++) { if (c == K[i]) return i; } r...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; char str[1010000]; char in[100]; int v[300]; int w[300]; int main() { bool sec = false; while (1) { int n = 0; bool last = true; int ns = 0; while (1) { gets(in); if (in[0] == 0) break; ns++; for (int i = 0; in[i]; i++) { ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string str; bool first = true; while (getline(cin, str)) { string s = str; string minSizeStr; while (getline(cin, str), str != "") s += str; long long cnt = 0; string key; getline(cin, key); if (key.size() == 1) { for (in...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string s; while (getline(cin, s)) { string str(s), sb; while (getline(cin, s)) { if (s.size() == 0) break; str += s; } getline(cin, sb); getline(cin, s); int ansl = (1 << 24), ret = 0; string ans; map<char, int> d...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int size = 51; int cnt[size]; int ksize; bool check() { for (int i = 0; i < ksize; i++) { if (cnt[i] == 0) return false; } return true; } int contain(string& K, char c) { for (int i = 0; i < ksize; i++) { if (c == K[i]) return i; } return -1; } voi...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; bool check(int begin, int end, vector<vector<int> > &ind) { for (int i = 0; i < (int)ind.size(); ++i) { vector<int>::iterator it_b = lower_bound(ind[i].begin(), ind[i].end(), begin); vector<int>::iterator it_e = lower_bound(ind[i].begin(), ind[i].end(), en...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { for (string si; getline(cin, si), si != "";) { string s; do { s += si; getline(cin, si); } while (si != ""); string k; getline(cin, k); cin.ignore(); map<char, int> m; int f = 0, l = 1 << 30; int n = 0; set<...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; char str[1010000]; char in[100]; int v[300]; int w[300]; int main() { bool sec = false; while (1) { int n = 0; bool last = true; int ns = 0; while (1) { gets(in); if (in[0] == 0) break; ns++; for (int i = 0; in[i]; i++) { ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { while (true) { stringstream ss; string tmp; if (!getline(cin, tmp)) break; ss << tmp; while (true) { getline(cin, tmp); if (tmp == "") break; ss << tmp; } string str = ss.str(); string key; getline(cin, ke...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int size = 51; int cnt[size]; int ksize; bool check() { for (int i = 0; i < ksize; i++) { if (cnt[i] == 0) return false; } return true; } int contain(string& K, char c) { for (int i = 0; i < ksize; i++) { if (c == K[i]) return i; } return -1; } voi...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.*; import java.lang.*; import java.math.*; import java.io.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class Main{ Scanner sc=new Scanner(System.in); int INF=1<<28; double EPS=1e-9; String s, key; void run(){ for(;;){ s=""; for(;;){ String line=sc.n...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; bool notfirst; const int size = 51; int cnt[size]; int ksize; bool check() { for (int i = 0; i < ksize; i++) { if (cnt[i] == 0) return false; } return true; } int contain(string& K, char c) { for (int i = 0; i < ksize; i++) { if (c == K[i]) return i; } r...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.*; import java.lang.*; import java.math.*; import java.io.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class Main{ Scanner sc=new Scanner(System.in); int INF=1<<28; double EPS=1e-9; char[] s, key; void run(){ for(;;){ String lines=""; for(;;){ Strin...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
//47 #include<iostream> #include<sstream> #include<string> #include<map> #include<algorithm> #include<set> using namespace std; int main(){ for(string si;getline(cin,si),si!="";){ string s; do{ s+=si; getline(cin,si); }while(si!=""); string k; getline(cin,k); cin.ignore(); ma...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; bool notfirst; const int size = 51; int cnt[size]; int ksize; bool check() { for (int i = 0; i < ksize; i++) { if (cnt[i] == 0) return false; } return true; } int contain(string& K, char c) { for (int i = 0; i < ksize; i++) { if (c == K[i]) return i; } r...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; bool notfirst; const int size = 51; int cnt[size]; int ksize; bool check() { for (int i = 0; i < ksize; i++) { if (cnt[i] == 0) return false; } return true; } int contain(string& K, char c) { for (int i = 0; i < ksize; i++) { if (c == K[i]) return i; } r...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> char S[1000001], K[51], input[73]; int pos[50]; int max_, min_, min_span, min_min, min_max, Klen, min_char_pos, count; int my_strchr(char *s, char c, char start) { char *ret; ret = strchr(s + start + 1, c); if (ret) return (ret - s); else return (-1); } void search(int *min_, in...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; string s, t, temp; int scnt[300], tcnt[300], ans[1000005], B[1000005], E[1000005]; int main() { while (getline(cin, temp)) { s = ""; s += temp; while (1) { getline(cin, temp); s += temp; if (temp == "") break; } getline(cin, temp); ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; bool notfirst; const int size = 51; int cnt[size]; int ksize; bool check() { for (int i = 0; i < ksize; i++) { if (cnt[i] == 0) return false; } return true; } int contain(string& K, char c) { for (int i = 0; i < ksize; i++) { if (c == K[i]) return i; } r...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; void compute(string text, string S) { int nt = text.size(), nS = S.size(); int mlen = (1 << 29); string ans; set<string> all; bool found[nS]; int CNT = 0; int fpos[nS]; for (int i = 0; i < nS; i++) found[i] = false; for (int i = 0; i < nt; i++) { bool ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; template <class T> void debug(T begin, T end) { for (T i = begin; i != end; ++i) cerr << *i << " "; cerr << endl; } inline bool valid(int x, int y, int W, int H) { return (x >= 0 && y >= 0 && x < W && y < H); } const int INF = 100000000; const double EPS = 1e-8; const...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string in; string key; int size; vector<int> pos; int find[50]; int npos; while (1) { in = ""; string tmp; while (1) { getline(cin, tmp); if (tmp.size() == 0) break; in += tmp; } key = ""; while (1) { ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int MAX = 51; string text, key; map<char, int> M; int numKey[MAX]; bool input() { text = ""; string s; getline(cin, s); if (s == "") return false; text = s; while (getline(cin, s) && s != "") text += s; getline(cin, s); key = s; getline(cin, s); re...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; char chs[1001]; int main() { bool fi = false; string str; while (getline(cin, str)) { if (fi) cout << endl; else fi = true; string tmp; while (getline(cin, tmp) && tmp != "") str += tmp; memset(chs, 0, sizeof(chs)); string emp; ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int MAX = 51; string text, key; map<char, int> M; int numKey[MAX]; bool input() { text = ""; string s = ""; if (!getline(cin, s)) return false; if (s == "") return false; text = s; while (getline(cin, s) && s != "") text += s; getline(cin, s); key = s;...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.*; public class Main{ //2116 start private void doit(){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ ArrayList<Character> list = new ArrayList<Character>(); String input = sc.nextLine(); while(! input.equals("")){ for(int i = 0; i < input.length(); i++){ list.add(...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int size = 51; int cnt[size]; int ksize; bool check() { for (int i = 0; i < ksize; i++) { if (cnt[i] == 0) return false; } return true; } int contain(string& K, char c) { for (int i = 0; i < ksize; i++) { if (c == K[i]) return i; } return -1; } voi...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; void compute(string text, string S) { int nt = text.size(), nS = S.size(); int mlen = (1 << 29); string ans; set<string> all; bool found[nS]; int fpos[nS]; for (int i = 0; i < nS; i++) found[i] = false; for (int i = 0; i < nt; i++) { int cnt = 0, mn, mx;...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); constexpr int NUM = 128; constexpr int WIDTH = 72; bool first = true; string line; while (getline(cin, line)) { if (first) first = false; else cout << endl; string text = ""; ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> char s[1000000 + 1]; char sc[50 + 1]; char *find; int minret; char *find11; char aaa[1000]; char bbb[1000]; void print_find() { int i; for (i = 0; i <= minret; i++) printf("%c", find[i]); printf("\n"); } int my_strstr(char *s1, char *s2) { int mincnt, ret; extern int my_strstr_sub(cha...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int size = 51; int cnt[256]; int need[256]; int ksize; bool check(string& K) { for (int i = 0; i < ksize; i++) { if (cnt[K[i]] < need[K[i]]) return false; } return true; } int contain(string& K, char c) { for (int i = 0; i < ksize; i++) { if (c == K[i]...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; static const double EPS = 1e-8; string gText; string gQuery; vector<int> gIndex[1024]; class State { public: int _min_pos; int _max_pos; int _query_i; State(int min_pos, int max_pos, int query_i) : _min_pos(min_pos), _max_pos(max_pos), _query_i(query_i) {} ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
import std.stdio; import std.ascii; import std.c.stdio; import std.range; import std.array; import std.functional; import std.algorithm; import std.conv; import std.container; import std.math; import std.numeric; import std.string; import std.c.string; import std.regex; import std.typecons; bool first = true; string ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string str; bool first = true; while (getline(cin, str)) { if (!first) cout << endl; string s = str; string minSizeStr; while (getline(cin, str), str != "") s += str; int cnt = 0; string key; getline(cin, key); getline(cin,...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; char str[1010000]; char in[100]; int v[300]; int w[300]; int main() { while (1) { int n = 0; bool last = true; while (1) { gets(in); if (in[0] == 0) break; for (int i = 0; in[i]; i++) { str[n++] = in[i]; } } gets(in); ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; bool check(int begin, int end, vector<vector<int> > &ind) { if (begin > end) return false; for (int i = 0; i < (int)ind.size(); ++i) { if (ind[i].size() == 0) return false; vector<int>::iterator it_b = lower_bound(ind[i].begin(), ind[i].end(), begin); ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string str; bool first = true; while (getline(cin, str)) { string s = str; string minSizeStr; while (getline(cin, str), str != "") s += str; long long cnt = 0; string key; getline(cin, key); if (key.size() == 1) { for (in...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string str; bool first = true; while (getline(cin, str)) { if (!first) cout << endl; string s = str; string minSizeStr; while (getline(cin, str), str != "") s += str; long long cnt = 0; string key; getline(cin, key); if (ke...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.*; public class Main{ //2116 start private void doit(){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ ArrayList<Character> list = new ArrayList<Character>(); String input = sc.nextLine(); while(! input.equals("")){ for(int i = 0; i < input.length(); i++){ list.add(...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; bool check(int begin, int end, vector<vector<int> > &ind) { for (int i = 0; i < (int)ind.size(); ++i) { vector<int>::iterator it_b = lower_bound(ind[i].begin(), ind[i].end(), begin); vector<int>::iterator it_e = lower_bound(ind[i].begin(), ind[i].end(), en...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string str; bool first = true; while (getline(cin, str)) { if (!first) cout << endl; string s = str; string minSizeStr; while (getline(cin, str), str != "") s += str; int cnt = 0; string key; getline(cin, key); if (key.size...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; static const double EPS = 1e-8; void print_text(const string& text) { int offset = 0; int text_i = 0; while (offset < text.size()) { for (text_i = offset; text_i < text.size(); text_i++) { if (text_i - offset >= 72) break; printf("%c", text[text_i]); ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; string s, t, temp; int scnt[300], tcnt[300], ans[1000005], B[1000005], E[1000005]; int main() { while (getline(cin, temp)) { s = ""; s += temp; while (1) { getline(cin, temp); s += temp; if (temp == "") break; } getline(cin, temp); ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int INF = 1000000000; char chs[1001]; int main() { bool fi = false; string str; while (getline(cin, str) && str != "") { memset(chs, 0, sizeof(chs)); string ss; string tmp; if (fi) cout << endl << endl; else fi = true; while (...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string in; string key; int size; vector<int> pos; int find[50]; int npos; while (cin >> in >> key) { int l = 0, u = 0; size = 10000000; npos = 0; for (int i = 0; i < key.size(); i++) find[i] = 0; pos.clear(); int nf = 0; ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include<set> #include<iostream> #include<cmath> #include<cstdio> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define inf (1<<29) using namespace std; void compute(string text,string S) { int nt = text.size(),nS = S.size(); int mlen = inf; string ans; bool found[nS]; int CNT = 0;...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include<iostream> #include<string> using namespace std; int main() { string text,key,temp; for(;;) { text=key=""; while(getline(cin,text)&&text.empty()) ; if(cin.eof())return 0; while(getline(cin,temp)&&!temp.empty()) text+=temp; if(cin.eof())return 0; while(getline(cin,key)&&key.empty()) ; i...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> char s[1000000 + 1]; char sc[50 + 1]; char *find; int minret; char *find11; char aaa[1000]; char bbb[1000]; void print_find() { int i; for (i = 0; i <= minret; i++) printf("%c", find[i]); printf("\n"); } int my_strstr(char *s1, char *s2) { int mincnt, ret; extern int my_strstr_sub(cha...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; char chs[1001]; int main() { bool fi = false; string str; while (getline(cin, str)) { if (fi) cout << endl; else fi = true; string tmp; while (getline(cin, tmp) && tmp != "") str += tmp; memset(chs, 0, sizeof(chs)); string emp; ...
p00795 Co-occurrence Search
A huge amount of information is being heaped on WWW. Albeit it is not well-organized, users can browse WWW as an unbounded source of up-to-date information, instead of consulting established but a little out-of-date encyclopedia. However, you can further exploit WWW by learning more about keyword search algorithms. Fo...
{ "input": [ "Thefirstexampleistrivial.\n\nmfv\n\nAhugeamountofinformationisbeingheapedonWWW.Albeititisnot\nwell-organized,userscanbrowseWWWasanunboundedsourceof\nup-to-dateinformation,insteadofconsultingestablishedbutalittle\nout-of-dateencyclopedia.However,youcanfurtherexploitWWWby\nlearningmoreaboutkeywordsear...
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { string str; bool first = true; while (getline(cin, str)) { if (!first) cout << endl; string s = str; while (getline(cin, str), str != "") { s += str; } string key; getline(cin, key); int keyNum[1000]; memset(keyNum, -...