我有phpinfo()文本,我想将带有帖子数据的文本发送到另一个Php页面,我想在此页面中显示Php信息.
我的代码:
index.php
<html>
<form action = "go.php" method = "post">
<input type = "text" name = "msg"><br><br>
<input type = "submit" value = "Submit">
</form>
<html>
Run Code Online (Sandbox Code Playgroud)
go.php :
<?
$message = $_POST['msg'];
echo "Message : $message<br>";
?>
Run Code Online (Sandbox Code Playgroud)
如何在发送phpinfo()带有帖子数据的文本时显示php信息?
当我写phpinfo()时index.php不显示php信息go.php.
如何找到具有最大总和的数字的增加子序列.我找到O(N ^ 2)但我想知道O(N log N).
谢谢!
我想在priority_queue中存储3个整数.我知道如何存储2个整数.我存储了2个整数pair<int,int>
我的代码
priority_queue<pair<int,int> , vector<pair<int,int> > , greater<pair<int,int> > > pq;
pq.push(make_pair(5,6));
Run Code Online (Sandbox Code Playgroud)
但我不知道如何存储3个整数.我需要帮助.
对不起我的英语不好.
我可以读一个字符串,std::cin但我不知道如何用一个withscanf()阅读.如何更改下面的代码以使用scanf()?
string s[20][5];
for (int i=1;i<=10;i++)
{
for (int j=1;j<=3;j++)
{
cin>>s[i][j];
}
}
Run Code Online (Sandbox Code Playgroud) 这是问题所在
BFG-9000每次射击都会摧毁三个相邻的阳台.(第N个阳台与第一个阳台相邻).射击后,生存的怪物对列昂尼德(小说的主要英雄)造成伤害 - 每个怪物一个单位.继新拍摄之后,等待所有怪物灭亡.需要定义最小的伤害量,这可能需要Leonid.
例如 :
N = 8
A[] = 4 5 6 5 4 5 6 5
answer : 33
4 * * * 4 5 6 5 - 24
4 * * * * * * 5 - 9
* * * * * * * * - 0
Run Code Online (Sandbox Code Playgroud)
你能帮我解决这个问题吗?复杂性是什么?
我需要帮助返回没有pop()的堆栈的第二个元素?但我不知道我该怎么用.
我的代码:
stack<int> st;
st.push(10);
st.push(20);
st.top(); // return 20
Run Code Online (Sandbox Code Playgroud)
如何在不使用pop()的情况下使此函数返回10;
谢谢.
对不起我的英语.
当我使用i++++给编译错误:
for (int i=1;i<=10;i++++) {} //a.cpp:63: error: lvalue required as increment operand
Run Code Online (Sandbox Code Playgroud)
要么
int i = 0;
i++++; // a.cpp:65: error: lvalue required as increment operand
Run Code Online (Sandbox Code Playgroud)
但是当我使用的时候++++i.有人解释我为什么++++i经常但i++++不规律?
谢谢.