Diff
checker
Texte
Texte
Images
Documents
Excel
Dossiers
Legal
Enterprise
Application de bureau
Prix
Se connecter
Télécharger Diffchecker Desktop
Comparer le texte
Trouver la différence entre deux fichiers texte
Outils
Historique
Éditeur live
Cacher identiques
Sans retour à la ligne
Vue
Divisé
Unifié
Niveau de précision
Intelligent
Mot
Caractère
Coloration syntaxique
Choisir la syntaxe
Ignorer
Transformer le texte
Aller au premier écart
Modifier l'entrée
Diffchecker Desktop
La façon la plus sécurisée d'utiliser Diffchecker. Obtenez l'application Diffchecker Desktop : vos diffs ne quittent jamais votre ordinateur !
Obtenir Desktop
Untitled diff
Créé
il y a 9 ans
Le diff n'expire jamais
Effacer
Exporter
Partager
Expliquer
1 suppression
Lignes
Total
Supprimé
Caractères
Total
Supprimé
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
64 lignes
Copier tout
0 ajouts
Lignes
Total
Ajouté
Caractères
Total
Ajouté
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
63 lignes
Copier tout
#include<bits/stdc++.h>
#include<bits/stdc++.h>
using namespace std;
using namespace std;
//#define debug(...) printf( __VA_ARGS__ )
//#define debug(...) printf( __VA_ARGS__ )
#define debug(...) /****nothing****/
#define debug(...) /****nothing****/
#define ll long long
#define ll long long
#define ull unsigned long long
#define ull unsigned long long
#define pb push_back
#define pb push_back
#define mem(arr,val) memset(arr,val,sizeof(arr))
#define mem(arr,val) memset(arr,val,sizeof(arr))
#define mp make_pair
#define mp make_pair
#define pii pair<int,int>
#define pii pair<int,int>
#define F first
#define F first
#define S second
#define S second
#define sz(x) (int)(x).size()
#define sz(x) (int)(x).size()
#define nopos string::npos
#define nopos string::npos
#define fr(i,a,b) for(i=a;i<=b;i++)
#define fr(i,a,b) for(i=a;i<=b;i++)
#define frn(i,a,b) for(i=a;i>=b;i--)
#define frn(i,a,b) for(i=a;i>=b;i--)
set<int> st;
set<int> st;
int n,m,i,j,k;
int n,m,i,j,k;
int main()
int main()
{
{
//freopen("d://i.txt","r",stdin);
//freopen("d://i.txt","r",stdin);
//freopen("d://o.txt","w",stdout);
//freopen("d://o.txt","w",stdout);
cin>>n>>m;
cin>>n>>m;
int fl2=1; // every group is not full of traitor
int fl2=1; // every group is not full of traitor
int cnt=0;
int cnt=0;
while(m--)
while(m--)
{
{
scanf("%d",&k);
scanf("%d",&k);
int fl=0; // assume all are traitor in this group
int fl=0; // assume all are traitor in this group
while(k--)
while(k--)
{
{
scanf("%d",&j);
scanf("%d",&j);
auto it=st.lower_bound(-j);
auto it=st.lower_bound(-j);
if(it!=st.end() && *it==-j)
if(it!=st.end() && *it==-j)
{
{
fl=1;
fl=1;
Copier
Copié
Copier
Copié
break;
}
}
st.insert(j);
st.insert(j);
}
}
if(fl==0) // all are traitor in this group
if(fl==0) // all are traitor in this group
{
{
fl2=0; // at least one group is all are traitor
fl2=0; // at least one group is all are traitor
break;
break;
}
}
st.clear();
st.clear();
}
}
printf((fl2==0)?"YES":"NO");
printf((fl2==0)?"YES":"NO");
return 0;
return 0;
}
}
Différences enregistrées
Texte d'origine
Ouvrir un fichier
#include<bits/stdc++.h> using namespace std; //#define debug(...) printf( __VA_ARGS__ ) #define debug(...) /****nothing****/ #define ll long long #define ull unsigned long long #define pb push_back #define mem(arr,val) memset(arr,val,sizeof(arr)) #define mp make_pair #define pii pair<int,int> #define F first #define S second #define sz(x) (int)(x).size() #define nopos string::npos #define fr(i,a,b) for(i=a;i<=b;i++) #define frn(i,a,b) for(i=a;i>=b;i--) set<int> st; int n,m,i,j,k; int main() { //freopen("d://i.txt","r",stdin); //freopen("d://o.txt","w",stdout); cin>>n>>m; int fl2=1; // every group is not full of traitor int cnt=0; while(m--) { scanf("%d",&k); int fl=0; // assume all are traitor in this group while(k--) { scanf("%d",&j); auto it=st.lower_bound(-j); if(it!=st.end() && *it==-j) { fl=1; break; } st.insert(j); } if(fl==0) // all are traitor in this group { fl2=0; // at least one group is all are traitor break; } st.clear(); } printf((fl2==0)?"YES":"NO"); return 0; }
Texte modifié
Ouvrir un fichier
#include<bits/stdc++.h> using namespace std; //#define debug(...) printf( __VA_ARGS__ ) #define debug(...) /****nothing****/ #define ll long long #define ull unsigned long long #define pb push_back #define mem(arr,val) memset(arr,val,sizeof(arr)) #define mp make_pair #define pii pair<int,int> #define F first #define S second #define sz(x) (int)(x).size() #define nopos string::npos #define fr(i,a,b) for(i=a;i<=b;i++) #define frn(i,a,b) for(i=a;i>=b;i--) set<int> st; int n,m,i,j,k; int main() { //freopen("d://i.txt","r",stdin); //freopen("d://o.txt","w",stdout); cin>>n>>m; int fl2=1; // every group is not full of traitor int cnt=0; while(m--) { scanf("%d",&k); int fl=0; // assume all are traitor in this group while(k--) { scanf("%d",&j); auto it=st.lower_bound(-j); if(it!=st.end() && *it==-j) { fl=1; } st.insert(j); } if(fl==0) // all are traitor in this group { fl2=0; // at least one group is all are traitor break; } st.clear(); } printf((fl2==0)?"YES":"NO"); return 0; }
Trouver la différence