当前位置:网站首页>1130: find the first character that appears only once
1130: find the first character that appears only once
2022-06-30 14:49:00 【I would, I think】
#include<string.h>
#include<iostream>
using namespace std;
int main()
{
char a[100000];
char b[100000];
int count;
cin.getline(a,100000);
strcpy(b,a);
int i=0,j;
for(i=0;i<strlen(a);i++)
{
for(j=0;j<strlen(b);j++)
{
if(a[i]==b[j]&&i!=j)
{
count=0;
break;
}
}
if(count==1)
{
cout<<a[i];
return 0;
}
else
count=1;
}
cout<<"no";
return 0;
}边栏推荐
- Finding the root of an integer by dichotomy
- V3 02——What‘s new in Chrome extensions
- Double pointer palindrome string
- DefCamp Capture the Flag (D-CTF) 2021-22 web
- Sum of squares of two pointers
- CCF sequence segmentation (Full Score code + problem solving idea) 201509 -1
- 机械工程师面试的几个问题,你能答上来几个?
- CCF string matching (Full Score code + problem solving ideas + skill summary) March 3, 2014
- The difference between settimeout() and setinterval()
- Using docker to manage MySQL services under Windows
猜你喜欢
![[geek challenge 2019] PHP problem solving record](/img/bf/038082e8ee1c91eaf6e35add39f760.jpg)
[geek challenge 2019] PHP problem solving record

CCF command line options (Full Score code + problem solving ideas + skill summary) March 3, 2014

On simple code crawling Youdao translation_ 0's problem (to be solved)

Upgrade centos7 mysql5.5 to mysql5.7 non RPM in the form of tar package

2021-05-12

Sum of CCF digits (full mark code + problem solving idea) 201512-1

How to use Alibaba Vector Icon

PS tip: the video frame to Layer command cannot be completed because dynamiclink is not available

CCF adjacent number pairs (Full Score code + problem solving ideas + skill summary) 201409-1
[email protected][])"/>NoViableAltException([email protected][])
随机推荐
ThinkPHP v3.2 comment annotation injection write shell
Double pointer palindrome string
Minimum covering substring of two pointers
Use of laravel repository mode
The difference between settimeout() and setinterval()
V3_ Chrome extended Chinese translation document V3 directory
CCF string matching (Full Score code + problem solving ideas + skill summary) March 3, 2014
数控加工中心打刀缸工作原理及故障处理
V3 01_ Welcome
Judgment of deep learning experiment results
Shangpinhui knowledge points of large e-commerce projects
Experiment 2: stack
2021-08-05 leetcode notes
V3 02——What‘s new in Chrome extensions
Error $(...) size is not a function
PHP conditional operator
CCF sequence segmentation (Full Score code + problem solving idea) 201509 -1
CCF drawing (full mark code + problem solving ideas + skill summary) February 2, 2014
CCF image rotation (Full Score code + problem solving idea) 201503-01
机械工程师面试的几个问题,你能答上来几个?