拜托白眉大侠 单田芳帮忙看下我的是不是带锁的??如果是个带锁的,买大概多少钱

求一首歌的名子,歌词大概是“是你让我坚持这样一个方向你是我们的信仰,就算风大雨狂……”拜托各位大侠_百度知道
求一首歌的名子,歌词大概是“是你让我坚持这样一个方向你是我们的信仰,就算风大雨狂……”拜托各位大侠
各位拜托了!
我有更好的答案
下载知道APP
随时随地咨询
出门在外也不愁G3随e行是否有忙时和非忙时之分,如果有的话各是哪个时段呢?哪位大侠知道,麻烦指点一下,拜托帮帮忙啊!!_百度知道
G3随e行是否有忙时和非忙时之分,如果有的话各是哪个时段呢?哪位大侠知道,麻烦指点一下,拜托帮帮忙啊!!
我前几天开始用G3随e行上网,发现除了早上八点前网速还可以,其它就很慢^
提问者采纳
是的呢我的比你还差呢。网页打的能要命。唉。。。
提问者评价
采纳率100%
其他类似问题
随e行的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁POJ1002 请各位大侠帮我看看,总是超时,结果对,怎么改呢,拜托
POJ1002 请各位大侠帮我看看,总是超时,结果对,怎么改呢,拜托
Description
Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase. For example, you can call the University of Waterloo by dialing the memorable TUT-GLOP. Sometimes only part of the number is used to spell a word. When you get back to your hotel tonight you can order a pizza from Gino's by dialing 310-GINO. Another way to make a telephone number memorable is to group the digits in a memorable way. You could order your pizza from Pizza Hut by calling their ``three tens'' number 3-10-10-10. The standard form of a telephone number is seven decimal digits with a hyphen between the third and fourth digits (e.g. 888-1200). The keypad of a phone supplies the mapping of letters to numbers, as follows: A, B, and C map to 2 D, E, and F map to 3 G, H, and I map to 4 J, K, and L map to 5 M, N, and O map to 6 P, R, and S map to 7 T, U, and V map to 8 W, X, and Y map to 9 There is no mapping for Q or Z. Hyphens are not dialed, and can be added and removed as necessary. The standard form of TUT-GLOP is 888-4567, the standard form of 310-GINO is 310-4466, and the standard form of 3-10-10-10 is 310-1010. Two telephone numbers are equivalent if they have the same standard form. (They dial the same number.) Your company is compiling a directory of telephone numbers from local businesses. As part of the quality control process you want to check that no two (or more) businesses in the directory have the same telephone number.
The input will consist of one case. The first line of the input specifies the number of telephone numbers in the directory (up to 100,000) as a positive integer alone on the line. The remaining lines list the telephone numbers in the directory, with each number alone on a line. Each telephone number consists of a string composed of decimal digits, uppercase letters (excluding Q and Z) and hyphens. Exactly seven of the characters in the string will be digits or letters.
Generate a line of output for each telephone number that appears more than once in any form. The line should give the telephone number in standard form, followed by a space, followed by the number of times the telephone number appears in the directory. Arrange the output lines by telephone number in ascending lexicographical order. If there are no duplicates in the input print the line: No duplicates.
Sample Input12
3-10-10-10
-4-8-7-3-2-7-9-
Sample Output310-1010 2
487-3279 4
888-4567 3&我的代码:#include&iostream&#include&string&#include&stdlib.h&int main(){&char **a;&int i,j,k,m;&&int count,&&char *&while(cin&&num)&{&&a=(char**)malloc(sizeof(char*)*num);&&for(i=0;i&i++)&&&a[i]=(char*)malloc(sizeof(char)*100);&&for(i=0;i&i++)&&&cin&&a[i];&&for(i=0;i&i++)&&{&&&j=0;&&&temp=0;&&&while(a[i][j]!='\0')&&&{&&&&switch(a[i][j])&&&&{&&&&case '0':&&&&case '1':&&&&case '2':&&&&case '3':&&&&case '4':&&&&case '5':&&&&case '6':&&&&case '7':&&&&case '8':&&&&case '9':a[i][temp]=a[i][j];temp++;&&&&case'A':&&&&case'B':&&&&case'C':a[i][temp]='2';temp++;&&&&case'D':&&&&case'E':&&&&case'F':a[i][temp]='3';temp++;&&&&case'G':&&&&case'H':&&&&case'I':a[i][temp]='4';temp++;&&&&case'J':&&&&case'K':&&&&case'L':a[i][temp]='5';temp++;&&&&case'M':&&&&case'N':&&&&case'O':a[i][temp]='6';temp++;&&&&case'P':&&&&case'R':&&&&case'S':a[i][temp]='7';temp++;&&&&case'T':&&&&case'U':&&&&case'V':a[i][temp]='8';temp++;&&&&case'W':&&&&case'X':&&&&case'Y':a[i][temp]='9';temp++;&&&&default:&&&&}&&&&j++;&&&}&&&a[i][temp]='\0';&&&for(k=8;k&=4;k--)&&&&a[i][k]=a[i][k-1];&&&a[i][3]='-';&&}&&for(i=0;i&i++)&&&&&&&&&&& //排序(很垃圾),怎么改?&&&for(j=i;j&j++)&&&{&&&&if(strcmp(a[i],a[j])&0)&&&&{&&&&&tempchar=a[j];&&&&&a[j]=a[i];&&&&&a[i]=&&&&}&&&}&&one=0;&&if(num==1)&&&cout&&"No duplicates."&&&&else&&{&&&m=0;&&&while(m&num-1)&&&{&&&&count=0;&&&&for(i=m+1;i&i++)&&&&{&&&&&if(strcmp(a[m],a[i])==0)&&&&&{&&&&&&count++;&&&&&&if(count==1) one=1;&&&&&}&&&&&else&&&&&&&&&&}&&&&if(count!=0)&&&&&cout&&a[m]&&" "&&count+1&&&&&&m=i;&&&}&&&if(one==0)&&&&cout&&"No duplicates."&&&&}&}&return 0;}
补充:如果在poj上可以AC的话我可以追加分数的
超时了说明算法效率低,需要优化,有几点可以提高运行速度:
1、将cin和cout换成scanf和printf;
2、将动态申请内存malloc换成直接在栈中申请;
3、排序方法不要使用冒泡排序,调用快排库函数qsort或sort来排序;
我对你代码进行了一些优化,但没有修改前两点,视情况需要(不能AC的话)你自己修改:
#include&iostream&#include&string&#include&stdlib.h&int comp(const void *p, const void *q){&&& return strcmp(*(char **)p, *(char **)q);}int main(){&char **a;&int i,j,k,m,n;&&int count,&&char *&while(cin&&num)&{& a=(char**)malloc(sizeof(char*)*num);& for(i=0;i&i++)&& a[i]=(char*)malloc(sizeof(char)*100);& for(i=0;i&i++)&& cin&&a[i];& for(i=0;i&i++)& {&& j=0;&& temp=0;&& while(a[i][j]!='\0')&& {&&& switch(a[i][j])&&& {&&& case '0':&&& case '1':&&& case '2':&&& case '3':&&& case '4':&&& case '5':&&& case '6':&&& case '7':&&& case '8':&&& case '9':a[i][temp]=a[i][j];temp++;&&& case'A':&&& case'B':&&& case'C':a[i][temp]='2';temp++;&&& case'D':&&& case'E':&&& case'F':a[i][temp]='3';temp++;&&& case'G':&&& case'H':&&& case'I':a[i][temp]='4';temp++;&&& case'J':&&& case'K':&&& case'L':a[i][temp]='5';temp++;&&& case'M':&&& case'N':&&& case'O':a[i][temp]='6';temp++;&&& case'P':&&& case'R':&&& case'S':a[i][temp]='7';temp++;&&& case'T':&&& case'U':&&& case'V':a[i][temp]='8';temp++;&&& case'W':&&& case'X':&&& case'Y':a[i][temp]='9';temp++;&&& default:&&& }&&& j++;&& }&& a[i][temp]='\0';&& for(k=8;k&=4;k--)&&& a[i][k]=a[i][k-1];&& a[i][3]='-';& }& /*& for(i=0;i&i++)&&&&&&&&&&& //排序(很垃圾),怎么改?&& for(j=i;j&j++)&& {&&& if(strcmp(a[i],a[j])&0)&&& {&&&& tempchar=a[j];&&&& a[j]=a[i];&&&& a[i]=&&& }&& }&& */& qsort(a, num, sizeof(a[0]), comp);& one=0;& if(num==1)&& cout&&"No duplicates."&&& else& {&& /*&& m=0;&& while(m&num-1)&& {&&& count=0;&&& for(i=m+1;i&i++)&&& {&&&& if(strcmp(a[m],a[i])==0)&&&& {&&&&& count++;&&&&& if(count==1) one=1;&&&& }&&&& else&&&&&&&& }&&& if(count!=0)&&&& cout&&a[m]&&" "&&count+1&&&&& m=i;&& }&& if(one==0)&&& cout&&"No duplicates."&&&&& */&&& m = 0;&&& while (m & num)&&& {&&&&&&& n =&&&&&&& while (n & num && strcmp(a[n], a[m]) == 0) ++n;&&&&&&& if (n - m != 1)&&&&&&& {&&&&&&&&&&& cout && a[m] && " " && n - m &&&&&&&&&&&&& one = 1;&&&&&&& }&&&&&&& m =&&& }&&& if (one == 0)&&&&&&& cout && "No duplicates." &&& }&}&return 0;}
不说什么了,非常感谢,当时我也想用快排函数,但int cmp里面那个写不对,看了您的之后,我明白了,这道题AC了,虽然我写的效率不高,哈希、字典索引什么的我还没有学过,我们暑假有集训,我会努力,您的回答很及时,谢谢,分数给您了
的感言:谢谢
相关知识等待您来回答
编程领域专家| WAP下载访问: |
S60第一版和第二版
全新Asha平台
今日论坛第 1 个签到,每日签到可得财富值+2,连续5天签到后再连续签到则每日可得财富值
+4,记得每天都来签到哦~
微软已经放出邀请,宣布将于本月21日举行新品发布会,届时Windows Phone 10操作系统很有可能将会亮相。如今,外国媒体NPU为我们带来了该系统的最新消息,消息显示随着Windows Phone 10系统的发布,首批搭载该系统的新款智能手机也将发布。据悉,微软很有可能将在三月初的MWC大会期间发布首批Windows Phone 10系统智能手机,这其中甚至会有一款高端Lumia手机。
滚动播报:
站内全文搜索,由谷歌和塞班合作提供 站内全文搜索,由百度和塞班合作提供
上一主题:
下一主题:
积分/帖子 2
财富值 3 塞班币
贡献值 0 点
好评度 0 点
交易信用 0 点
原创小红花 0 朵
人气值 0 点
连续签到天数 0
全部签到天数 0
注册 手机型号&
求助求助!拜托大侠帮忙看一下是不是翻新机
拜托大侠帮忙看一下是不是翻新机
老板说是港行的全新的,今天刚买的诶~~
序列号:86012DPV3NQ
型号:MC132ZP
积分/帖子 443
财富值 614 塞班币
贡献值 0 点
好评度 0 点
交易信用 0 点
原创小红花 0 朵
人气值 31 点
连续签到天数 0
全部签到天数 0
注册 手机型号&
港版 无锁&&翻新
screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {} else {window.open(this.src);}" onmousewheel="return imgzoom(this);" alt="" />
当前时区 GMT+8, 现在时间是
基于Discuz!&&dospy自优化版本1.0&&

我要回帖

更多关于 白眉大侠 单田芳 的文章

 

随机推荐