#include #include #include using namespace std; string longestCommonPrefix(vector& strs){ if(strs.empty()) return ""; int p = 0; string ans = ""; int minlen = 1e9; for(int i = 0; i < strs.size(); i++){ if(strs[i].size() < minlen) minlen = strs[i].size(); } while(p < minlen){ char c = strs[0][p]; for(int i = 0; i < strs.size(); ++i){ if(strs[i][p] != c) return ans; } p++; ans += c; } return ans; } //fucking no aircon shit int main(){ return 0; }